Function at 0x499cd0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x64
mov eax, dword [esp + 0x68]
mov ecx, dword [eax]
push ebx
push ebp
movzx ebp, byte [eax + 0x2c]
push esi
push edi
xor edi, edi
cmp ebp, 1
mov dword [esp + 0x40], edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x44], edi
mov dword [esp + 0x50], edi
mov dword [esp + 0x48], ecx
mov dword [esp + 0x58], ebp
jg 0x499d05
lea esi, [edi + 1]
jmp 0x499d14
mov esi, ebp
sub esi, 2
neg esi
sbb esi, esi
and esi, 5
add esi, 5
mov eax, dword [eax + 8]
cmp eax, edi
mov dword [esp + 0x30], esi
je 0x499d2a
cmp word [esp + 0x7c], di
je 0x499d2a
mov ebx, dword [eax]
jmp 0x499d2c
xor ebx, ebx
mov ecx, dword [ecx]
lea eax, [ebp + 8]
imul eax, esi
lea eax, [ebx + eax*4]
add eax, eax
cdq
push edx
push eax
mov dword [esp + 0x54], ebx
call fcn.00419650
mov edx, eax
add esp, 8
cmp edx, edi
mov dword [esp + 0x3c], edx
jne 0x499d5f
mov eax, 7
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret
xor eax, eax
mov ecx, esi
shl ecx, 5
lea edi, [ecx + edx]
mov dword [edi], eax
mov dword [edi + 4], eax
mov dword [edi + 8], eax
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], eax
mov dword [edi + 0x14], eax
mov dword [edi + 0x18], eax
mov dword [edi + 0x1c], eax
lea eax, [esi + esi]
add ecx, edi
test eax, eax
mov dword [esp + 0x24], edx
mov dword [esp + 0x38], edi
jle 0x499dae
lea esi, [ebp*4]
add edx, 0x18
jmp 0x499da0
mov dword [edx], ecx
sub eax, 1
add edx, 0x20
add ecx, esi
test eax, eax
jg 0x499da0
test ebx, ebx
je 0x499dc5
lea edx, [ebx + ebx]
push edx
push 0
push ecx
mov dword [esp + 0x5c], ecx
call sub.ntdll.dll_memset
add esp, 0xc
mov eax, dword [esp + 0x48]
mov eax, dword [eax + 0x8c]
cmp eax, 0x30
jb 0x499dd9
mov eax, 0x30
test ebx, ebx
mov word [edi + 0x10], ax
mov eax, 1
je 0x499df4
test ebp, ebp
jle 0x499def
or ecx, 0xffffffff
jmp 0x499df1
mov ecx, ebx
mov byte [edi + 0x16], cl
test ebp, ebp
mov dword [esp + 0x28], 0
jle 0x49a36b
jmp 0x499e10
test eax, eax
mov dword [esp + 0x2c], 0
jle 0x49a2a0
mov ecx, dword [esp + 0x38]
add ecx, 0x10
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x54], eax
nop
mov edx, dword [esp + 0x78]
mov eax, dword [edx + 0x40]
test eax, eax
mov dword [esp + 0x18], eax
je 0x49a290
mov eax, dword [esp + 0x1c]
mov ebx, dword [eax - 0xc]
mov esi, dword [eax - 0x10]
mov edx, dword [esp + 0x18]
add eax, 0xfffffff0
mov eax, esi
mov ecx, ebx
not eax
and eax, dword [edx]
not ecx
and ecx, dword [edx + 4]
mov dword [esp + 0x70], ebx
or eax, ecx
jne 0x49a27d
mov eax, edx
mov ebp, dword [eax + 0xc]
mov edi, dword [eax + 8]
mov eax, edi
mov ecx, ebp
and eax, esi
and ecx, ebx
or eax, ecx
jne 0x49a27d
mov ecx, edx
test dword [ecx + 0x2c], 0x4000
je 0x499e9e
mov eax, dword [esp + 0x1c]
cmp word [eax], 3
jl 0x49a27d
mov edx, dword [esp + 0x1c]
movzx eax, word [edx]
mov dx, word [ecx + 0x14]
movzx ecx, word [ecx + 0x12]
add dx, ax
mov dword [esp + 0x20], eax
movzx eax, dx
cmp cx, ax
jl 0x499efb
movsx edx, ax
movsx eax, cx
lea ebx, [edx + 0x31]
cmp eax, ebx
jle 0x499ed2
movzx eax, cx
mov dword [esp + 0x14], eax
jmp 0x499f34
lea ebx, [edx + 0x1f]
cmp eax, ebx
jle 0x499ee5
add ecx, 1
movzx ecx, cx
mov dword [esp + 0x14], ecx
jmp 0x499f34
sub eax, edx
movzx dx, byte [eax + 0x4c1ca0]
add dx, cx
movzx eax, dx
mov dword [esp + 0x14], eax
jmp 0x499f34
movsx edx, cx
movsx ecx, ax
lea ebx, [edx + 0x31]
cmp ecx, ebx
jle 0x499f11
movzx ecx, ax
mov dword [esp + 0x14], ecx
jmp 0x499f34
lea ebx, [edx + 0x1f]
cmp ecx, ebx
jle 0x499f20
add eax, 1
movzx edx, ax
jmp 0x499f30
sub ecx, edx
movzx cx, byte [ecx + 0x4c1ca0]
add cx, ax
movzx edx, cx
mov dword [esp + 0x14], edx
mov eax, dword [esp + 0x1c]
movzx ecx, word [eax + 4]
mov dx, word [esp + 0x14]
cmp dx, cx
jl 0x499f75
movsx ecx, cx
movsx eax, dx
lea ebx, [ecx + 0x31]
cmp eax, ebx
jg 0x499fae
lea ebx, [ecx + 0x1f]
cmp eax, ebx
jle 0x499f61
add dword [esp + 0x14], 1
jmp 0x499fae
sub eax, ecx
movzx cx, byte [eax + 0x4c1ca0]
add dx, cx
mov word [esp + 0x14], dx
jmp 0x499fae
movsx edx, dx
movsx eax, cx
lea ebx, [edx + 0x31]
cmp eax, ebx
jle 0x499f8b
movzx edx, cx
mov dword [esp + 0x14], edx
jmp 0x499fae
lea ebx, [edx + 0x1f]
cmp eax, ebx
jle 0x499f9a
add ecx, 1
movzx eax, cx
jmp 0x499faa
sub eax, edx
movzx dx, byte [eax + 0x4c1ca0]
add dx, cx
movzx eax, dx
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x18]
mov dx, word [ecx + 0x16]
add dx, word [esp + 0x20]
or ebp, dword [esp + 0x70]
movzx eax, dx
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x1c]
mov bl, byte [eax + 6]
or edi, esi
test bl, bl
mov esi, dword [esp + 0x78]
mov dword [esp + 0x64], edi
mov dword [esp + 0x68], ebp
jge 0x49a00e
xor edx, edx
mov dword [esp + 0x5c], edx
mov dword [esp + 0x60], edx
lea edx, [esp + 0x5c]
push edx
movzx edx, word [esi + 0x28]
push ecx
mov ecx, dword [esp + 0x30]
push ecx
push edx
add eax, 0xfffffff0
push eax
mov eax, dword [esi + 8]
push eax
push esi
call fcn.00499420
add esp, 0x1c
mov bl, al
jmp 0x49a01c
mov ecx, dword [eax - 8]
mov edx, dword [eax - 4]
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x60], edx
test bl, bl
jl 0x49a0e4
mov eax, dword [esp + 0x4c]
movsx edi, bl
cmp edi, eax
jge 0x49a0e4
mov ebp, dword [esp + 0x50]
cmp word [ebp + edi*2], 0
jne 0x49a055
push eax
mov eax, dword [esp + 0x80]
push esi
call fcn.00499c00
add esp, 8
mov word [ebp + edi*2], ax
movzx eax, word [ebp + edi*2]
mov dx, word [esp + 0x14]
cmp dx, ax
movsx ecx, ax
jl 0x49a0a2
movsx eax, dx
lea esi, [ecx + 0x31]
cmp eax, esi
jg 0x49a0d9
lea esi, [ecx + 0x1f]
cmp eax, esi
jle 0x49a08a
mov eax, dword [esp + 0x14]
add eax, 1
movzx eax, ax
add eax, 3
movzx esi, ax
jmp 0x49a0ee
sub eax, ecx
movzx cx, byte [eax + 0x4c1ca0]
add cx, dx
movzx eax, cx
add eax, 3
movzx esi, ax
jmp 0x49a0ee
movsx edx, dx
lea esi, [edx + 0x31]
cmp ecx, esi
jle 0x49a0b7
movzx eax, ax
add eax, 3
movzx esi, ax
jmp 0x49a0ee
lea esi, [edx + 0x1f]
cmp ecx, esi
jle 0x49a0cc
add eax, 1
movzx eax, ax
add eax, 3
movzx esi, ax
jmp 0x49a0ee
sub ecx, edx
movzx dx, byte [ecx + 0x4c1ca0]
add dx, ax
movzx eax, dx
add eax, 3
movzx esi, ax
jmp 0x49a0ee
movzx esi, word [esp + 0x14]
sub dword [esp + 0x14], 2
cmp dword [esp + 0x28], 0
jne 0x49a10a
mov eax, dword [esp + 0x18]
test dword [eax + 0x2c], 0x2000000
je 0x49a10a
sub esi, 0xa
sub dword [esp + 0x20], 0x1e
mov ebp, dword [esp + 0x2c]
mov edi, dword [esp + 0x24]
xor eax, eax
test ebp, ebp
jle 0x49a142
mov ecx, dword [edi]
cmp ecx, dword [esp + 0x64]
jne 0x49a132
mov edx, dword [edi + 4]
cmp edx, dword [esp + 0x68]
jne 0x49a132
mov cl, byte [edi + 0x16]
xor cl, bl
test cl, cl
jns 0x49a13e
add eax, 1
add edi, 0x20
cmp eax, ebp
jl 0x49a118
jmp 0x49a142
cmp eax, ebp
jl 0x49a184
cmp ebp, dword [esp + 0x30]
jl 0x49a172
cmp si, word [esp + 0x34]
jg 0x49a27d
jne 0x49a165
mov dx, word [esp + 0x44]
cmp word [esp + 0x14], dx
jge 0x49a27d
mov edi, dword [esp + 0x40]
shl edi, 5
add edi, dword [esp + 0x24]
jmp 0x49a1b3
mov edi, ebp
add ebp, 1
shl edi, 5
add edi, dword [esp + 0x24]
mov dword [esp + 0x2c], ebp
jmp 0x49a1b3
movzx eax, word [edi + 0x12]
cmp ax, si
jl 0x49a27d
jne 0x49a1b3
movzx eax, word [edi + 0x10]
cmp ax, word [esp + 0x20]
jl 0x49a27d
jne 0x49a1b3
mov ax, word [esp + 0x14]
cmp word [edi + 0x14], ax
jle 0x49a27d
mov eax, dword [esp + 0x1c]
mov edx, dword [eax - 0x10]
mov ebp, dword [eax - 0xc]
mov ecx, dword [esp + 0x18]
or ebp, dword [ecx + 0xc]
or edx, dword [ecx + 8]
mov ecx, dword [esp + 0x5c]
mov dword [edi + 4], ebp
mov ebp, dword [esp + 0x28]
mov dword [edi], edx
mov edx, dword [esp + 0x60]
mov dword [edi + 8], ecx
mov cx, word [esp + 0x20]
mov dword [edi + 0xc], edx
mov dx, word [esp + 0x14]
add ebp, ebp
mov word [edi + 0x10], cx
mov ecx, dword [edi + 0x18]
mov word [edi + 0x12], si
mov word [edi + 0x14], dx
mov byte [edi + 0x16], bl
mov eax, dword [eax + 8]
add ebp, ebp
push ebp
push eax
push ecx
call sub.ntdll.dll_memcpy
mov ecx, dword [esp + 0x3c]
mov edx, dword [edi + 0x18]
mov eax, dword [esp + 0x24]
add esp, 0xc
cmp dword [esp + 0x2c], ecx
mov dword [edx + ebp], eax
jl 0x49a27d
mov ecx, dword [esp + 0x24]
movzx esi, word [ecx + 0x12]
movzx edi, word [ecx + 0x10]
mov ebx, dword [esp + 0x30]
mov eax, 1
cmp ebx, eax
mov dword [esp + 0x40], 0
mov dword [esp + 0x34], esi
mov dword [esp + 0x44], edi
jle 0x49a27d
add ecx, 0x32
lea esp, [esp]
movzx edx, word [ecx]
cmp dx, si
jg 0x49a260
jne 0x49a26b
cmp word [ecx + 2], di
jle 0x49a26b
movzx edi, word [ecx + 2]
movzx esi, dx
mov dword [esp + 0x40], eax
add eax, 1
add ecx, 0x20
cmp eax, ebx
jl 0x49a250
mov dword [esp + 0x44], edi
mov dword [esp + 0x34], esi
mov edx, dword [esp + 0x18]
mov eax, dword [edx + 0x3c]
test eax, eax
mov dword [esp + 0x18], eax
jne 0x499e43
add dword [esp + 0x1c], 0x20
sub dword [esp + 0x54], 1
jne 0x499e30
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x24]
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x28]
add ecx, 1
cmp ecx, dword [esp + 0x58]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x28], ecx
jl 0x499e10
test eax, eax
jne 0x49a36b
mov esi, dword [esp + 0x48]
push str.no_query_solution
call fcn.0041cbf0
mov ecx, dword [esi]
mov eax, dword [esp + 0x40]
add esp, 4
test ecx, ecx
je 0x49a355
cmp eax, dword [ecx + 0x164]
jae 0x49a33a
cmp eax, dword [ecx + 0x15c]
jb 0x49a317
mov edx, dword [ecx + 0x158]
mov dword [eax], edx
mov dword [ecx + 0x158], eax
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret
cmp eax, dword [ecx + 0x160]
jb 0x49a33a
mov edx, dword [ecx + 0x150]
mov dword [eax], edx
mov dword [ecx + 0x150], eax
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret
cmp dword [ecx + 0x210], 0
je 0x49a355
call fcn.00419210
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret
push eax
call fcn.004191a0
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret
cmp eax, 1
mov ecx, dword [esp + 0x38]
mov ebp, ecx
jle 0x49a394
add ecx, 0x20
add eax, 0xffffffff
lea esp, [esp]
mov dx, word [ebp + 0x12]
cmp dx, word [ecx + 0x12]
jle 0x49a38c
mov ebp, ecx
add ecx, 0x20
sub eax, 1
jne 0x49a380
mov ebx, dword [esp + 0x58]
mov esi, dword [esp + 0x78]
xor ecx, ecx
test ebx, ebx
jle 0x49a3d8
lea eax, [esi + 0x334]
jmp 0x49a3b0
mov edx, dword [ebp + 0x18]
mov edi, dword [edx + ecx*4]
mov dword [eax + 0x14], edi
mov dl, byte [edi + 0x10]
mov byte [eax], dl
mov edi, dword [esi + 4]
movzx edx, dl
lea edx, [edx + edx*8]
mov edx, dword [edi + edx*8 + 0x34]
mov dword [eax - 0x38], edx
add ecx, 1
add eax, 0x60
cmp ecx, ebx
jl 0x49a3b0
movzx eax, word [esi + 0x28]
test eax, 0x100
je 0x49a427
test al, al
js 0x49a427
cmp byte [esi + 0x2f], 0
jne 0x49a427
cmp word [esp + 0x7c], 0
je 0x49a427
mov ecx, dword [ebp + 0x18]
mov edx, dword [ecx + ebx*4 - 4]
mov ecx, dword [esi + 0xc]
lea eax, [esp + 0x6c]
push eax
push edx
lea eax, [ebx - 1]
push eax
push 0x80
push ebp
push ecx
push esi
call fcn.00499420
mov edx, dword [esi + 0xc]
movsx eax, al
add esp, 0x1c
cmp eax, dword [edx]
jne 0x49a427
mov byte [esi + 0x2f], 2
and dword [esi + 0x30], 0xfffffffb
mov eax, dword [esi + 8]
test eax, eax
mov edi, dword [esi + 0x30]
je 0x49a55f
movzx edx, word [esi + 0x28]
test dl, dl
mov cl, byte [ebp + 0x16]
mov byte [esi + 0x2d], cl
jns 0x49a477
movsx edx, byte [ebp + 0x16]
cmp edx, dword [eax]
jne 0x49a453
mov byte [esi + 0x2f], 2
mov ecx, dword [esi + 0x10]
mov edi, dword [ecx + 0x30]
test edi, edi
je 0x49a508
movsx edx, byte [esi + 0x2d]
cmp edx, dword [edi]
jle 0x49a508
mov cl, byte [edi]
mov byte [esi + 0x2d], cl
jmp 0x49a508
mov ecx, dword [ebp + 8]
mov dword [esi + 0x48], ecx
mov ecx, dword [ebp + 0xc]
mov dword [esi + 0x4c], ecx
mov cl, byte [esi + 0x2d]
test cl, cl
jg 0x49a4f4
test ebx, ebx
mov byte [esi + 0x2d], 0
jle 0x49a508
mov edx, dword [ebp + 0x18]
mov ecx, dword [edx + ebx*4 - 4]
mov edx, dword [ecx + 0x2c]
test edx, 0x1000
jne 0x49a508
and edx, 0x104
cmp edx, 0x104
je 0x49a508
xor edx, edx
mov dword [esp + 0x5c], edx
mov dword [esp + 0x60], edx
lea edx, [esp + 0x5c]
push edx
push ecx
lea ecx, [ebx - 1]
push ecx
push 0x800
push ebp
push eax
push esi
call fcn.00499420
movsx ecx, al
mov eax, dword [esi + 8]
add esp, 0x1c
cmp ecx, dword [eax]
jne 0x49a508
mov edx, dword [esp + 0x5c]
mov ecx, dword [esp + 0x60]
or dword [esi + 0x30], 4
mov dword [esi + 0x48], edx
mov dword [esi + 0x4c], ecx
jmp 0x49a508
test ebx, ebx
je 0x49a508
cmp cl, 1
jne 0x49a508
test dl, 3
je 0x49a508
or edi, 4
mov dword [esi + 0x30], edi
test word [esi + 0x28], 0x200
je 0x49a55f
movsx edx, byte [esi + 0x2d]
cmp edx, dword [eax]
jne 0x49a55f
test ebx, ebx
jle 0x49a55f
lea edx, [esp + 0x5c]
push edx
mov edx, dword [ebp + 0x18]
mov edx, dword [edx + ebx*4 - 4]
push edx
xor ecx, ecx
add ebx, 0xffffffff
push ebx
push ecx
push ebp
push eax
push esi
mov dword [esp + 0x78], ecx
mov dword [esp + 0x7c], ecx
call fcn.00499420
mov ecx, dword [esi + 8]
movsx eax, al
add esp, 0x1c
cmp eax, dword [ecx]
jne 0x49a55f
mov edx, dword [esp + 0x5c]
mov eax, dword [esp + 0x60]
or dword [esi + 0x30], 8
mov dword [esi + 0x48], edx
mov dword [esi + 0x4c], eax
mov cx, word [ebp + 0x10]
mov edx, dword [esp + 0x48]
mov word [esi + 0x34], cx
mov ecx, dword [edx]
test ecx, ecx
mov esi, dword [esp + 0x3c]
je 0x49a5d7
cmp esi, dword [ecx + 0x164]
jae 0x49a5bd
cmp esi, dword [ecx + 0x15c]
jb 0x49a59d
mov eax, dword [ecx + 0x158]
mov dword [esi], eax
mov dword [ecx + 0x158], esi
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret
cmp esi, dword [ecx + 0x160]
jb 0x49a5bd
mov edx, dword [ecx + 0x150]
mov dword [esi], edx
mov dword [ecx + 0x150], esi
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret
cmp dword [ecx + 0x210], 0
je 0x49a5d7
mov eax, esi
call fcn.00419210
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret
cmp dword [0x4d43b8], 0
je 0x49a631
mov eax, dword [0x4d6a20]
test eax, eax
je 0x49a5f3
push eax
call dword [0x4d4408]
add esp, 4
push esi
call dword [0x4d43e4]
sub dword [0x4d69b8], eax
sub dword [0x4d69dc], 1
add esp, 4
push esi
call dword [0x4d43dc]
mov eax, dword [0x4d6a20]
add esp, 4
test eax, eax
je 0x49a63b
push eax
call dword [0x4d4410]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret
push esi
call dword [0x4d43dc]
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x64
ret