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

Disassembly:
sub esp, 0x64
push ebx
push ebp
mov ebp, dword [esp + 0x70]
mov eax, dword [ebp]
push esi
mov esi, dword [eax]
mov dword [esp + 0x50], eax
movzx eax, byte [ebp + 0x29]
push edi
xor edi, edi
cmp eax, 1
mov dword [esp + 0x40], edi
mov dword [esp + 0x48], edi
mov dword [esp + 0x44], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x58], esi
mov dword [esp + 0x28], eax
jg 0x4f625c
lea ebx, [edi + 1]
jmp 0x4f626b
mov ebx, eax
sub ebx, 2
neg ebx
sbb ebx, ebx
and ebx, 5
add ebx, 5
mov ecx, dword [ebp + 8]
mov dword [esp + 0x30], ebx
cmp ecx, edi
je 0x4f6281
cmp word [esp + 0x7c], di
je 0x4f6281
mov ecx, dword [ecx]
jmp 0x4f6283
xor ecx, ecx
add eax, 8
imul eax, ebx
lea eax, [ecx + eax*4]
add eax, eax
cdq
push edx
push eax
mov dword [esp + 0x44], ecx
call fcn.004cb940
add esp, 8
mov dword [esp + 0x1c], eax
cmp eax, edi
jne 0x4f62b2
pop edi
pop esi
pop ebp
mov eax, 7
pop ebx
add esp, 0x64
ret
mov edx, dword [esp + 0x1c]
xor eax, eax
mov ecx, ebx
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, [ebx + ebx]
mov ebx, dword [esp + 0x28]
add ecx, edi
mov dword [esp + 0x24], edx
mov dword [esp + 0x38], edi
test eax, eax
jle 0x4f6302
lea esi, [ebx*4]
add edx, 0x18
mov dword [edx], ecx
dec eax
add edx, 0x20
add ecx, esi
test eax, eax
jg 0x4f62f6
mov esi, dword [esp + 0x3c]
test esi, esi
je 0x4f631d
lea eax, [esi + esi]
push eax
push 0
push ecx
mov dword [esp + 0x38], ecx
call fcn.00412eb0
add esp, 0xc
mov ecx, dword [esp + 0x54]
mov eax, dword [ecx + 0x1a8]
cmp eax, 0x30
jb 0x4f6331
mov eax, 0x30
mov word [edi + 0x10], ax
mov eax, 1
test esi, esi
je 0x4f634c
test ebx, ebx
jle 0x4f6347
or ecx, 0xffffffff
jmp 0x4f6349
mov ecx, esi
mov byte [edi + 0x16], cl
mov dword [esp + 0x34], 0
test ebx, ebx
jle 0x4f6880
lea esp, [esp]
mov dword [esp + 0x20], 0
test eax, eax
jle 0x4f67ca
mov edx, dword [esp + 0x38]
add edx, 0x10
mov dword [esp + 0x18], edx
mov dword [esp + 0x50], eax
nop
mov eax, dword [esp + 0x78]
mov ebx, dword [eax + 0x10]
mov dword [esp + 0x4c], ebx
test ebx, ebx
je 0x4f67ba
mov eax, dword [esp + 0x18]
mov cl, byte [eax + 6]
mov edx, dword [eax - 0xc]
mov edi, dword [eax - 0x10]
add eax, 0xfffffff0
mov byte [esp + 0x13], cl
xor ecx, ecx
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x60], ecx
mov eax, edi
mov ecx, edx
not eax
and eax, dword [ebx]
not ecx
and ecx, dword [ebx + 4]
mov dword [esp + 0x70], edx
or eax, ecx
jne 0x4f67ab
mov esi, dword [ebx + 8]
mov ebp, dword [ebx + 0xc]
mov eax, esi
mov ecx, ebp
and eax, edi
and ecx, edx
or eax, ecx
jne 0x4f67ab
mov edx, dword [esp + 0x18]
movzx eax, word [edx]
mov cx, word [ebx + 0x14]
add cx, ax
movzx eax, cx
movzx ecx, word [ebx + 0x12]
cmp cx, ax
jl 0x4f642e
movsx edx, ax
movsx eax, cx
lea ebx, [edx + 0x31]
cmp eax, ebx
jg 0x4f645e
lea ebx, [edx + 0x1f]
cmp eax, ebx
jle 0x4f6418
inc ecx
movzx eax, cx
mov dword [esp + 0x14], eax
jmp 0x4f6465
sub eax, edx
movzx dx, byte [eax + str._n_n_t_t_b_b_a_a_a]
add dx, cx
movzx eax, dx
mov dword [esp + 0x14], eax
jmp 0x4f6465
movsx edx, cx
movsx ecx, ax
lea ebx, [edx + 0x31]
cmp ecx, ebx
jle 0x4f6444
movzx ecx, ax
mov dword [esp + 0x14], ecx
jmp 0x4f6465
lea ebx, [edx + 0x1f]
cmp ecx, ebx
jle 0x4f6451
inc eax
movzx edx, ax
jmp 0x4f6461
sub ecx, edx
movzx cx, byte [ecx + str._n_n_t_t_b_b_a_a_a]
add cx, ax
movzx edx, cx
mov dword [esp + 0x14], edx
mov eax, dword [esp + 0x18]
movzx ecx, word [eax + 4]
mov dx, word [esp + 0x14]
cmp dx, cx
jl 0x4f64a5
movsx ecx, cx
movsx eax, dx
lea ebx, [ecx + 0x31]
cmp eax, ebx
jg 0x4f64dc
lea ebx, [ecx + 0x1f]
cmp eax, ebx
jle 0x4f6491
inc dword [esp + 0x14]
jmp 0x4f64dc
sub eax, ecx
movzx cx, byte [eax + str._n_n_t_t_b_b_a_a_a]
add dx, cx
mov word [esp + 0x14], dx
jmp 0x4f64dc
movsx edx, dx
movsx eax, cx
lea ebx, [edx + 0x31]
cmp eax, ebx
jle 0x4f64bb
movzx edx, cx
mov dword [esp + 0x14], edx
jmp 0x4f64dc
lea ebx, [edx + 0x1f]
cmp eax, ebx
jle 0x4f64c8
inc ecx
movzx eax, cx
jmp 0x4f64d8
sub eax, edx
movzx dx, byte [eax + str._n_n_t_t_b_b_a_a_a]
add dx, cx
movzx eax, dx
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x18]
mov ebx, dword [esp + 0x4c]
movzx eax, word [ecx]
mov dx, word [ebx + 0x16]
or ebp, dword [esp + 0x70]
add dx, ax
movzx eax, dx
mov dword [esp + 0x4c], eax
mov al, byte [esp + 0x13]
or esi, edi
mov edi, dword [esp + 0x78]
mov dword [esp + 0x64], esi
mov dword [esp + 0x68], ebp
test al, al
jge 0x4f653a
movzx eax, word [edi + 0x22]
mov edx, dword [esp + 0x34]
lea ecx, [esp + 0x5c]
push ecx
mov ecx, dword [edi + 8]
push ebx
push edx
push eax
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
push eax
push ecx
push edi
call fcn.004f5b20
add esp, 0x1c
mov byte [esp + 0x13], al
jmp 0x4f6548
mov edx, dword [ecx - 8]
mov ecx, dword [ecx - 4]
mov dword [esp + 0x5c], edx
mov dword [esp + 0x60], ecx
test al, al
jl 0x4f663e
mov ecx, dword [esp + 0x3c]
movsx esi, al
cmp esi, ecx
jge 0x4f663e
mov edx, dword [esp + 0x2c]
cmp word [edx + esi*2], 0
jne 0x4f65c9
mov eax, ecx
sub eax, esi
imul eax, eax, 0x64
cdq
idiv ecx
cdq
push edx
push eax
call fcn.004c07e0
sub ax, 0x42
add esp, 8
cmp word [esp + 0x7c], 0xa
movzx ebp, ax
jg 0x4f6592
xor eax, eax
jmp 0x4f65a6
movsx eax, word [esp + 0x7c]
cdq
push edx
push eax
call fcn.004c07e0
cwde
add esp, 8
sub eax, 0x21
mov ecx, dword [esp + 0x7c]
add eax, ebp
lea edx, [eax + ecx + 0x10]
mov ecx, 0x400
movzx eax, dx
test word [edi + 0x22], cx
je 0x4f65c1
add eax, 0x10
mov edx, dword [esp + 0x2c]
mov word [edx + esi*2], ax
mov eax, dword [esp + 0x2c]
movzx eax, word [eax + esi*2]
mov dx, word [esp + 0x14]
cmp dx, ax
movsx ecx, ax
jl 0x4f6610
movsx eax, dx
lea esi, [ecx + 0x31]
cmp eax, esi
jle 0x4f65ed
movzx esi, dx
jmp 0x4f6643
lea esi, [ecx + 0x1f]
cmp eax, esi
jle 0x4f65fe
mov ecx, dword [esp + 0x14]
inc ecx
movzx esi, cx
jmp 0x4f6643
sub eax, ecx
movzx ax, byte [eax + str._n_n_t_t_b_b_a_a_a]
add ax, dx
movzx esi, ax
jmp 0x4f6643
movsx edx, dx
lea esi, [edx + 0x31]
cmp ecx, esi
jle 0x4f661f
movzx esi, ax
jmp 0x4f6643
lea esi, [edx + 0x1f]
cmp ecx, esi
jle 0x4f662c
inc eax
movzx esi, ax
jmp 0x4f6643
sub ecx, edx
movzx cx, byte [ecx + str._n_n_t_t_b_b_a_a_a]
add cx, ax
movzx esi, cx
jmp 0x4f6643
movzx esi, word [esp + 0x14]
mov edi, dword [esp + 0x20]
mov ebp, dword [esp + 0x24]
xor eax, eax
test edi, edi
jle 0x4f6680
mov edx, dword [ebp]
cmp edx, dword [esp + 0x64]
jne 0x4f6672
mov ecx, dword [ebp + 4]
cmp ecx, dword [esp + 0x68]
jne 0x4f6672
mov dl, byte [ebp + 0x16]
xor dl, byte [esp + 0x13]
mov edi, dword [esp + 0x20]
test dl, dl
jns 0x4f667c
inc eax
add ebp, 0x20
cmp eax, edi
jl 0x4f6651
jmp 0x4f6680
cmp eax, edi
jl 0x4f66c2
cmp edi, dword [esp + 0x30]
jl 0x4f66b2
mov eax, dword [esp + 0x48]
cmp si, ax
jg 0x4f67ab
jne 0x4f66a5
mov ax, word [esp + 0x14]
cmp ax, word [esp + 0x44]
jge 0x4f67ab
mov ebp, dword [esp + 0x40]
shl ebp, 5
add ebp, dword [esp + 0x24]
jmp 0x4f66e0
mov ebp, edi
inc edi
shl ebp, 5
add ebp, dword [esp + 0x24]
mov dword [esp + 0x20], edi
jmp 0x4f66e0
movzx eax, word [ebp + 0x12]
cmp ax, si
jl 0x4f67ab
jne 0x4f66e0
mov cx, word [ebp + 0x10]
cmp cx, word [esp + 0x4c]
jle 0x4f67ab
mov edx, dword [ebx + 8]
mov ecx, dword [ebx + 0xc]
mov eax, dword [esp + 0x18]
or edx, dword [eax - 0x10]
or ecx, dword [eax - 0xc]
add eax, 0xfffffff0
mov eax, dword [esp + 0x60]
mov word [ebp + 0x12], si
mov esi, dword [esp + 0x34]
mov dword [ebp], edx
mov edx, dword [esp + 0x5c]
mov dword [ebp + 4], ecx
mov cx, word [esp + 0x4c]
mov dword [ebp + 0xc], eax
mov al, byte [esp + 0x13]
mov dword [ebp + 8], edx
mov dx, word [esp + 0x14]
mov word [ebp + 0x10], cx
mov ecx, dword [esp + 0x18]
add esi, esi
mov byte [ebp + 0x16], al
mov eax, dword [ebp + 0x18]
mov word [ebp + 0x14], dx
mov edx, dword [ecx + 8]
add esi, esi
push esi
push edx
push eax
call fcn.0040dc50
mov ecx, dword [ebp + 0x18]
add esp, 0xc
cmp edi, dword [esp + 0x30]
mov dword [esi + ecx], ebx
jl 0x4f67ab
mov ecx, dword [esp + 0x24]
movzx esi, word [ecx + 0x12]
movzx edi, word [ecx + 0x10]
mov ebp, dword [esp + 0x30]
mov eax, 1
cmp ebp, eax
mov dword [esp + 0x40], 0
mov dword [esp + 0x48], esi
mov dword [esp + 0x44], edi
jle 0x4f67ab
add ecx, 0x32
lea esp, [esp]
movzx edx, word [ecx]
cmp dx, si
jg 0x4f6790
jne 0x4f679b
cmp word [ecx + 2], di
jle 0x4f679b
movzx edi, word [ecx + 2]
movzx esi, dx
mov dword [esp + 0x40], eax
inc eax
add ecx, 0x20
cmp eax, ebp
jl 0x4f6780
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], esi
mov ebx, dword [ebx + 0x34]
mov dword [esp + 0x4c], ebx
test ebx, ebx
jne 0x4f6393
add dword [esp + 0x18], 0x20
sub dword [esp + 0x50], 1
jne 0x4f6380
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x38]
inc ecx
cmp ecx, dword [esp + 0x28]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x24], edx
mov dword [esp + 0x34], ecx
jl 0x4f6360
test eax, eax
jne 0x4f6878
mov edi, dword [esp + 0x54]
push str.no_query_solution
call fcn.004e0360
mov ecx, dword [esp + 0x5c]
mov eax, dword [esp + 0x20]
add esp, 4
test ecx, ecx
je 0x4f6862
cmp dword [ecx + 0x208], 0
je 0x4f6831
call fcn.004bf640
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x64
ret
cmp eax, dword [ecx + 0x114]
jb 0x4f6862
cmp eax, dword [ecx + 0x118]
jae 0x4f6862
mov edx, dword [ecx + 0x110]
pop edi
pop esi
mov dword [eax], edx
dec dword [ecx + 0xfc]
pop ebp
mov dword [ecx + 0x110], eax
mov eax, 1
pop ebx
add esp, 0x64
ret
push eax
call fcn.004bf5d0
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x64
ret
mov ebp, dword [esp + 0x78]
mov edi, dword [esp + 0x38]
cmp eax, 1
mov ebx, dword [esp + 0x28]
jle 0x4f68a4
lea ecx, [edi + 0x20]
dec eax
lea ecx, [ecx]
mov dx, word [edi + 0x12]
cmp dx, word [ecx + 0x12]
jle 0x4f689c
mov edi, ecx
add ecx, 0x20
sub eax, 1
jne 0x4f6890
xor ecx, ecx
test ebx, ebx
jle 0x4f68d9
lea eax, [ebp + 0x30c]
mov edx, dword [edi + 0x18]
mov esi, dword [edx + ecx*4]
mov dword [eax + 0x14], esi
mov dl, byte [esi + 0x10]
mov byte [eax], dl
mov esi, dword [ebp + 4]
movzx edx, dl
lea edx, [edx + edx*4]
shl edx, 4
mov edx, dword [edx + esi + 0x38]
mov dword [eax - 0x28], edx
inc ecx
add eax, 0x50
cmp ecx, ebx
jl 0x4f68b0
movzx eax, word [ebp + 0x22]
test eax, 0x400
je 0x4f692b
test eax, 0x200
jne 0x4f692b
cmp byte [ebp + 0x28], 0
jne 0x4f692b
cmp word [esp + 0x7c], 0
je 0x4f692b
mov ecx, dword [edi + 0x18]
mov edx, dword [ecx + ebx*4 - 4]
mov ecx, dword [ebp + 0xc]
lea eax, [esp + 0x6c]
push eax
push edx
lea eax, [ebx - 1]
push eax
push 0x200
push edi
push ecx
push ebp
call fcn.004f5b20
mov edx, dword [ebp + 0xc]
movsx eax, al
add esp, 0x1c
cmp eax, dword [edx]
jne 0x4f692b
mov byte [ebp + 0x28], 2
mov ecx, dword [ebp + 8]
xor esi, esi
cmp ecx, esi
je 0x4f69bf
movzx edx, word [ebp + 0x22]
test edx, 0x200
je 0x4f6952
movsx eax, byte [edi + 0x16]
cmp eax, dword [ecx]
jne 0x4f696c
mov byte [ebp + 0x28], 2
jmp 0x4f696c
mov al, byte [edi + 0x16]
mov byte [ebp + 0x24], al
test al, al
jge 0x4f6960
mov byte [ebp + 0x24], 0
mov eax, dword [edi + 8]
mov dword [ebp + 0x18], eax
mov eax, dword [edi + 0xc]
mov dword [ebp + 0x1c], eax
test edx, 0x800
je 0x4f69bf
movsx edx, byte [ebp + 0x24]
cmp edx, dword [ecx]
jne 0x4f69bf
cmp ebx, esi
jle 0x4f69bf
mov edx, dword [edi + 0x18]
lea eax, [esp + 0x5c]
push eax
mov eax, dword [edx + ebx*4 - 4]
push eax
dec ebx
push ebx
push esi
push edi
push ecx
push ebp
mov dword [esp + 0x78], esi
mov dword [esp + 0x7c], esi
call fcn.004f5b20
mov ecx, dword [ebp + 8]
movsx eax, al
add esp, 0x1c
cmp eax, dword [ecx]
jne 0x4f69bf
mov edx, dword [esp + 0x5c]
mov eax, dword [esp + 0x60]
mov byte [ebp + 0x25], 1
mov dword [ebp + 0x18], edx
mov dword [ebp + 0x1c], eax
mov cx, word [edi + 0x10]
mov word [ebp + 0x20], cx
mov ecx, dword [esp + 0x58]
cmp ecx, esi
je 0x4f6a1c
cmp dword [ecx + 0x208], esi
je 0x4f69ea
mov eax, dword [esp + 0x1c]
call fcn.004bf640
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x64
ret
mov esi, dword [esp + 0x1c]
cmp esi, dword [ecx + 0x114]
jb 0x4f6a20
cmp esi, dword [ecx + 0x118]
jae 0x4f6a20
mov edx, dword [ecx + 0x110]
mov dword [esi], edx
dec dword [ecx + 0xfc]
pop edi
mov dword [ecx + 0x110], esi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x64
ret
mov esi, dword [esp + 0x1c]
cmp dword [0x59bf10], 0
je 0x4f6a76
mov eax, dword [0x5a2d00]
test eax, eax
je 0x4f6a3c
push eax
call dword [0x59bf64]
add esp, 4
push esi
call dword [0x59bf40]
sub dword [0x5a2b48], eax
dec dword [0x5a2b6c]
push esi
call dword [0x59bf38]
mov eax, dword [0x5a2d00]
add esp, 8
test eax, eax
je 0x4f6a80
push eax
call dword [0x59bf6c]
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x64
ret
push esi
call dword [0x59bf38]
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x64
ret