Function at 0x502c50
Capabilities:
Enumerate pe sections
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x74
push ebx
mov ebx, dword [ebp + 0xc]
mov ecx, dword [ebx + 0x30]
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0x10]
mov esi, dword [eax]
mov dword [esp + 0x38], esi
mov esi, dword [eax + 4]
mov dword [esp + 0x3c], esi
mov esi, dword [eax + 8]
mov dword [esp + 0x40], esi
mov esi, dword [eax + 0xc]
mov dword [esp + 0x44], esi
mov esi, dword [eax + 0x10]
xor edx, edx
mov dword [esp + 0x48], esi
mov esi, dword [eax + 0x14]
mov dword [esp + 0x4c], esi
mov dword [esp + 0x10], edx
mov dword [esp + 0x28], edx
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], edx
mov dword [esp + 0x14], ecx
cmp dword [ecx + 0x2c], edx
je 0x502cfc
movzx eax, byte [ebx + 4]
sub eax, 0x74
je 0x502cda
sub eax, 1
je 0x502cd3
sub eax, 1
je 0x502ccc
mov eax, str.UNION
jmp 0x502cdf
mov eax, str.INTERSECT
jmp 0x502cdf
mov eax, str.EXCEPT
jmp 0x502cdf
mov eax, str.UNION_ALL
push eax
push str.ORDER_BY_clause_should_come_after__s_not_before
mov esi, edi
call fcn.004b2660
add esp, 8
mov dword [esp + 0x10], 1
jmp 0x503472
cmp dword [ecx + 0x38], edx
je 0x502d48
movzx eax, byte [ebx + 4]
sub eax, 0x74
je 0x502d3b
sub eax, 1
je 0x502d2e
sub eax, 1
je 0x502d21
mov eax, str.UNION
push eax
push str.LIMIT_clause_should_come_after__s_not_before
jmp 0x502ce5
mov eax, str.INTERSECT
push eax
push str.LIMIT_clause_should_come_after__s_not_before
jmp 0x502ce5
mov eax, str.EXCEPT
push eax
push str.LIMIT_clause_should_come_after__s_not_before
jmp 0x502ce5
mov eax, str.UNION_ALL
push eax
push str.LIMIT_clause_should_come_after__s_not_before
jmp 0x502ce5
mov esi, dword [edi + 8]
cmp esi, edx
je 0x502d55
mov dword [esp + 0x1c], esi
jmp 0x502d67
call fcn.005024e0
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x1c], eax
mov esi, eax
mov eax, dword [ebp + 0x10]
cmp byte [esp + 0x38], 0xc
jne 0x502d91
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [esp + 0x3c]
push 0
push edx
push eax
push 0x6c
push esi
call fcn.004cd400
mov eax, dword [ebp + 0x10]
mov ecx, dword [esp + 0x28]
add esp, 0x14
mov byte [esp + 0x38], 0xe
mov edx, dword [ebx + 8]
test edx, 0x400
je 0x502db5
lea ecx, [esp + 0x38]
push ecx
push edi
mov eax, ebx
call fcn.00502bf0
add esp, 8
mov dword [esp + 0x10], eax
jmp 0x503472
test edx, 0x2000
je 0x502dd1
lea edx, [esp + 0x38]
push edx
push ebx
push edi
call fcn.005027d0
add esp, 0xc
jmp 0x50331b
xor edx, edx
cmp dword [ebx + 0x2c], edx
je 0x502dea
push eax
push ebx
push edi
call fcn.005038b0
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movzx eax, byte [ebx + 4]
sub eax, 0x73
je 0x503136
sub eax, 1
je 0x503010
sub eax, 1
je 0x503136
mov eax, dword [edi + 0x28]
push edx
push edx
push eax
lea ecx, [eax + 2]
push 0x6c
push esi
mov dword [esp + 0x20], eax
mov dword [edi + 0x28], ecx
call fcn.004cd400
mov dword [ebx + 0x14], eax
mov ecx, dword [ebx + 0x34]
xor edx, edx
add esp, 0x14
mov eax, ebx
cmp ecx, edx
je 0x502e3b
mov eax, ecx
mov ecx, dword [eax + 0x34]
cmp ecx, edx
jne 0x502e32
or dword [eax + 8], 0x20
mov eax, dword [esp + 0xc]
mov ecx, dword [edi + 0x1a0]
mov dword [esp + 0x60], edx
mov dword [esp + 0x58], edx
mov dword [esp + 0x5c], edx
lea edx, [esp + 0x50]
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x14]
push edx
push eax
push edi
mov byte [esp + 0x5c], 1
mov dword [esp + 0x30], ecx
call fcn.00506f20
add esp, 0xc
mov dword [esp + 0x10], eax
test eax, eax
jne 0x503472
push eax
push eax
mov eax, dword [esp + 0x14]
inc eax
push eax
push 0x6c
push esi
call fcn.004cd400
mov ecx, dword [ebx + 0x38]
mov edx, dword [ebx + 0x3c]
mov dword [ebx + 0x18], eax
xor eax, eax
mov dword [ebx + 0x30], eax
mov dword [ebx + 0x38], eax
mov dword [ebx + 0x3c], eax
mov eax, dword [esp + 0x20]
add esp, 0x14
mov dword [esp + 0x30], ecx
lea ecx, [esp + 0x50]
inc eax
push ecx
mov dword [esp + 0x58], eax
mov eax, dword [edi + 0x1a0]
push ebx
push edi
mov dword [esp + 0x38], edx
mov dword [esp + 0x2c], eax
call fcn.00506f20
mov edx, dword [ebx + 0x30]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x20]
mov dword [ebx + 0x30], eax
movzx eax, word [eax + 6]
add esp, 0xc
cmp word [ebx + 6], ax
mov dword [esp + 0x28], edx
jle 0x502ef2
mov word [ebx + 6], ax
mov eax, dword [esp + 0x18]
push eax
mov eax, dword [ebx + 0x38]
call fcn.004e0bb0
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
add esp, 4
mov eax, esi
mov dword [ebx + 0x38], ecx
mov dword [ebx + 0x3c], edx
call fcn.004cd7c0
mov dword [esp + 0x14], eax
mov eax, esi
call fcn.004cd7c0
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x14]
push eax
push ebx
mov eax, edi
call fcn.00502540
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
push 0
push ecx
push edx
push 0x25
push esi
call fcn.004cd400
add esp, 0x1c
mov eax, edi
call fcn.004e66d0
push 0
push eax
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x14]
push eax
push 0x7a
push esi
call fcn.004cd400
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x20]
add esp, 0x14
inc eax
push 0
push eax
mov eax, dword [esp + 0x34]
push 0x1d
call fcn.004cd750
mov esi, dword [esp + 0x38]
add esp, 0xc
mov eax, edi
call fcn.004e66f0
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x30]
mov eax, dword [esp + 0xc]
push ecx
mov ecx, dword [ebx]
push esi
lea edx, [esp + 0x40]
push edx
push 0
push 0
push eax
push ecx
push ebx
push edi
call fcn.00500840
mov edx, esi
mov esi, dword [esp + 0x40]
add esp, 0x24
mov ecx, esi
call fcn.004cd810
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0xc]
push 0
push edx
push eax
push 7
push esi
call fcn.004cd400
mov edx, dword [esp + 0x28]
add esp, 0x14
mov ecx, esi
call fcn.004cd810
mov eax, dword [esp + 0xc]
push 0
push 0
inc eax
push eax
push 0x70
push esi
call fcn.004cd400
mov ecx, dword [esp + 0x20]
add esp, 0x14
push 0
push 0
push ecx
push 0x70
push esi
call fcn.004cd400
jmp 0x503318
mov dword [esp + 0x30], edx
mov edx, dword [ebx + 0xc]
mov dword [ecx + 0xc], edx
mov eax, dword [ebx + 0x10]
mov dword [ecx + 0x10], eax
mov edx, dword [ebx + 0x38]
mov dword [ecx + 0x38], edx
mov eax, dword [ebx + 0x3c]
mov dword [ecx + 0x3c], eax
mov edx, dword [edi + 0x1a0]
lea eax, [esp + 0x38]
push eax
push ecx
push edi
mov dword [esp + 0x30], edx
call fcn.00506f20
xor ecx, ecx
add esp, 0xc
mov dword [esp + 0x10], eax
mov dword [ebx + 0x38], ecx
mov dword [ebx + 0x3c], ecx
cmp eax, ecx
jne 0x503472
mov eax, dword [esp + 0x14]
mov dword [ebx + 0x30], ecx
mov ecx, dword [eax + 0xc]
mov dword [ebx + 0xc], ecx
mov edx, dword [eax + 0x10]
mov eax, ecx
mov dword [ebx + 0x10], edx
test eax, eax
je 0x5030a2
push 0
push 0
push eax
push 0x16
push esi
call fcn.004cd400
mov dword [esp + 0x44], eax
mov eax, dword [ebx + 0x10]
add esp, 0x14
test eax, eax
je 0x5030a2
push eax
inc eax
push eax
mov eax, dword [ebx + 0xc]
push eax
push 0x93
push esi
call fcn.004cd400
add esp, 0x14
mov ecx, dword [edi + 0x1a0]
lea edx, [esp + 0x38]
push edx
push ebx
push edi
mov dword [esp + 0x2c], ecx
call fcn.00506f20
mov cx, word [ebx + 6]
mov dword [esp + 0x1c], eax
mov eax, dword [ebx + 0x30]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x20]
mov dword [ebx + 0x30], eax
mov ax, word [eax + 6]
add esp, 0xc
call fcn.004b38b0
mov ecx, dword [esp + 0x14]
mov word [esp + 0xc], ax
mov word [ebx + 6], ax
mov eax, dword [ecx + 0x38]
test eax, eax
je 0x50311e
lea edx, [esp + 0x34]
push edx
push eax
call fcn.004e1b80
add esp, 8
test eax, eax
je 0x50311e
mov eax, dword [esp + 0x34]
test eax, eax
jle 0x50311e
cdq
push edx
push eax
call fcn.004b3900
add esp, 8
cmp word [esp + 0xc], ax
jle 0x50311e
mov word [ebx + 6], ax
mov eax, dword [esp + 0x30]
test eax, eax
je 0x50331b
mov edx, esi
call fcn.004cdb30
jmp 0x50331b
cmp byte [esp + 0x38], 1
jne 0x503147
mov eax, dword [esp + 0x3c]
mov dword [esp + 0xc], eax
jmp 0x503183
mov eax, dword [edi + 0x28]
push edx
push edx
push eax
lea ecx, [eax + 1]
push 0x6c
push esi
mov dword [esp + 0x20], eax
mov dword [edi + 0x28], ecx
call fcn.004cd400
mov dword [ebx + 0x14], eax
mov ecx, dword [ebx + 0x34]
add esp, 0x14
mov eax, ebx
test ecx, ecx
je 0x503179
mov edi, edi
mov eax, ecx
mov ecx, dword [eax + 0x34]
test ecx, ecx
jne 0x503170
or dword [eax + 8], 0x20
mov ecx, dword [esp + 0x14]
xor edx, edx
mov eax, dword [esp + 0xc]
mov dword [esp + 0x6c], eax
lea eax, [esp + 0x68]
push eax
mov dword [esp + 0x7c], edx
mov dword [esp + 0x74], edx
mov dword [esp + 0x78], edx
mov edx, dword [edi + 0x1a0]
push ecx
push edi
mov byte [esp + 0x74], 1
mov dword [esp + 0x30], edx
call fcn.00506f20
add esp, 0xc
mov dword [esp + 0x10], eax
test eax, eax
jne 0x503472
cmp byte [ebx + 4], 0x75
mov edx, dword [ebx + 0x38]
sete al
xor ecx, ecx
mov dword [esp + 0x34], edx
mov edx, dword [ebx + 0x3c]
mov dword [ebx + 0x30], ecx
mov dword [ebx + 0x38], ecx
mov dword [ebx + 0x3c], ecx
lea ecx, [esp + 0x68]
inc al
push ecx
mov byte [esp + 0x6c], al
mov eax, dword [edi + 0x1a0]
push ebx
push edi
mov dword [esp + 0x3c], edx
mov dword [esp + 0x2c], eax
call fcn.00506f20
mov edx, dword [esp + 0x24]
add esp, 0xc
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 0x2c]
push edx
call fcn.004e1890
mov eax, dword [ebx + 0x30]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x18]
add esp, 4
cmp byte [ebx + 4], 0x73
mov dword [ebx + 0x30], eax
mov dword [ebx + 0x2c], 0
jne 0x503240
mov ax, word [eax + 6]
mov cx, word [ebx + 6]
call fcn.004b38b0
mov word [ebx + 6], ax
mov ecx, dword [esp + 0x18]
mov eax, dword [ebx + 0x38]
push ecx
call fcn.004e0bb0
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
mov dword [ebx + 0x3c], eax
xor eax, eax
add esp, 4
cmp byte [esp + 0x38], 1
mov dword [ebx + 0x38], edx
mov dword [ebx + 0xc], eax
mov dword [ebx + 0x10], eax
je 0x50331b
mov eax, esi
call fcn.004cd7c0
mov dword [esp + 0x1c], eax
mov eax, esi
call fcn.004cd7c0
mov ecx, dword [esp + 0x1c]
push ecx
mov dword [esp + 0x34], eax
push ebx
mov eax, edi
call fcn.00502540
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x14]
push 0
push edx
push eax
push 0x25
push esi
call fcn.004cd400
mov ecx, dword [esi + 0x88]
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x4c]
add esp, 0x1c
push edx
mov edx, dword [esp + 0x10]
push eax
mov eax, dword [ebx]
mov dword [esp + 0x3c], ecx
lea ecx, [esp + 0x40]
push ecx
push 0
push 0
push edx
push eax
push ebx
push edi
call fcn.00500840
mov edx, dword [esp + 0x54]
add esp, 0x24
mov ecx, esi
call fcn.004cd810
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0xc]
push 0
push ecx
push edx
push 7
push esi
call fcn.004cd400
mov edx, dword [esp + 0x30]
add esp, 0x14
mov ecx, esi
call fcn.004cd810
mov eax, dword [esp + 0xc]
push 0
push 0
push eax
push 0x70
push esi
call fcn.004cd400
add esp, 0x14
mov al, byte [ebx + 4]
mov edx, dword [esp + 0x20]
xor ecx, ecx
cmp al, 0x74
setne cl
movzx eax, al
push ecx
mov ecx, dword [esp + 0x28]
push edx
push ecx
push edi
call fcn.00501400
add esp, 0x10
test byte [ebx + 8], 0x20
je 0x503472
mov edx, dword [ebx]
mov eax, dword [edx]
mov edi, dword [esp + 0x18]
push 1
push eax
mov dword [esp + 0x2c], eax
call fcn.00501200
mov edi, eax
add esp, 8
test edi, edi
jne 0x503370
mov dword [esp + 0x10], 7
jmp 0x503472
cmp dword [esp + 0x24], 0
lea eax, [edi + 0x14]
mov dword [esp + 0x14], 0
mov dword [esp + 0x30], eax
jle 0x5033c1
mov ecx, dword [esp + 0x14]
mov edx, dword [ebp + 8]
push ecx
push ebx
push edx
call fcn.00502680
mov ecx, dword [esp + 0x3c]
add esp, 0xc
mov dword [ecx], eax
test eax, eax
jne 0x5033ab
mov eax, dword [esp + 0x18]
mov edx, dword [eax + 8]
mov dword [ecx], edx
mov eax, dword [esp + 0x14]
inc eax
add ecx, 4
cmp eax, dword [esp + 0x24]
mov dword [esp + 0x14], eax
mov dword [esp + 0x30], ecx
jl 0x503386
mov dword [esp + 0x20], ebx
mov ebx, dword [esp + 0x20]
mov dword [esp + 0x14], 0
add ebx, 0x14
mov eax, dword [ebx]
test eax, eax
jl 0x503450
mov ecx, dword [esi]
cmp byte [ecx + 0x45], 0
je 0x5033e9
mov ecx, 0x5ef850
jmp 0x5033f2
mov ecx, dword [esi + 0x58]
lea edx, [eax + eax*4]
lea ecx, [ecx + edx*4]
mov edx, dword [esp + 0x24]
mov dword [ecx + 8], edx
inc dword [edi]
mov ecx, dword [esi]
cmp byte [ecx + 0x45], 0
je 0x503411
push 0xfffffffffffffff7
mov eax, edi
call fcn.004cdcf0
add esp, 4
jmp 0x503439
mov ecx, dword [esi + 0x58]
lea eax, [eax + eax*4]
cmp byte [ecx + eax*4 + 1], 0
lea ecx, [ecx + eax*4]
je 0x503432
push edi
push esi
mov eax, 0xfffffff7
call fcn.004cde50
add esp, 8
jmp 0x503439
mov dword [ecx + 0x10], edi
mov byte [ecx + 1], 0xf7
mov eax, dword [esp + 0x14]
inc eax
mov dword [ebx], 0xffffffff
add ebx, 4
cmp eax, 2
mov dword [esp + 0x14], eax
jl 0x5033d4
mov edx, dword [esp + 0x20]
mov eax, dword [edx + 0x30]
mov dword [esp + 0x20], eax
test eax, eax
jne 0x5033c5
add dword [edi], 0xffffffff
jne 0x503472
mov ecx, dword [edi + 0xc]
mov eax, edi
call fcn.004afab0
mov eax, dword [ebp + 0x10]
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
mov eax, dword [esp + 0x28]
test eax, eax
je 0x50349b
push 1
push eax
mov eax, dword [esp + 0x20]
push eax
call fcn.004ffa50
add esp, 0xc
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret