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

Disassembly:
sub esp, 0x64
push ebx
mov ebx, dword [esp + 0x6c]
push ebp
push esi
push edi
mov eax, dword [ebx]
movzx edx, byte [ebx + 0x29]
mov dword [esp + 0x44], 0
mov dword [esp + 0x4c], 0
mov ebp, dword [eax]
mov dword [esp + 0x48], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], ebp
mov dword [esp + 0x28], edx
cmp edx, 1
jg 0x4bea8b
mov edi, 1
jmp 0x4bea98
lea edi, [edx - 2]
neg edi
sbb edi, edi
and edi, 5
add edi, 5
mov eax, dword [ebx + 8]
mov dword [esp + 0x40], edi
test eax, eax
je 0x4beab0
mov ecx, dword [esp + 0x7c]
test cx, cx
je 0x4beab0
mov esi, dword [eax]
jmp 0x4beab2
xor esi, esi
lea eax, [edx + 8]
mov dword [esp + 0x34], esi
imul eax, edi
lea eax, [esi + eax*4]
add eax, eax
cdq
push edx
push eax
push ebp
call fcn.0047f320
mov edx, eax
add esp, 0xc
mov dword [esp + 0x2c], edx
test edx, edx
jne 0x4beae2
pop edi
pop esi
pop ebp
lea eax, [edx + 7]
pop ebx
add esp, 0x64
ret
mov eax, edi
mov ebp, edx
shl eax, 5
lea ecx, [eax + edx]
mov dword [esp + 0x20], ebp
mov dword [ecx], 0
mov dword [ecx + 4], 0
mov dword [ecx + 8], 0
mov dword [ecx + 0xc], 0
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0
mov dword [ecx + 0x18], 0
mov dword [esp + 0x50], ecx
mov dword [ecx + 0x1c], 0
add ecx, eax
lea eax, [edi + edi]
test eax, eax
jle 0x4beb50
mov esi, dword [esp + 0x28]
shl esi, 2
add edx, 0x18
mov edi, edi
mov dword [edx], ecx
lea edx, [edx + 0x20]
dec eax
add ecx, esi
test eax, eax
jg 0x4beb40
mov esi, dword [esp + 0x34]
test esi, esi
je 0x4beb67
lea eax, [esi + esi]
mov dword [esp + 0x58], ecx
push eax
push 0
push ecx
call sub.MSVCRT.dll_memset
add esp, 0xc
mov eax, dword [esp + 0x64]
mov eax, dword [eax + 0x1a4]
cmp eax, 0x30
jb 0x4beb7b
mov eax, 0x30
mov edi, dword [esp + 0x50]
mov word [edi + 0x10], ax
mov eax, 1
mov dword [esp + 0x54], eax
test esi, esi
je 0x4beba6
cmp dword [esp + 0x28], 0
jle 0x4beb9c
or eax, 0xffffffff
jmp 0x4beb9e
mov eax, esi
mov byte [edi + 0x16], al
mov eax, 1
xor esi, esi
mov dword [esp + 0x30], esi
cmp dword [esp + 0x28], esi
jle 0x4bf186
mov edx, dword [esp + 0x28]
lea ebx, [ebx]
xor ecx, ecx
mov dword [esp + 0x1c], ecx
test eax, eax
jle 0x4bef74
add edi, 0x10
mov dword [esp + 0x18], edi
mov edx, dword [ebx + 0x10]
mov dword [esp + 0x24], edx
test edx, edx
je 0x4bef56
mov al, byte [edi + 6]
mov ebx, dword [edi - 0x10]
mov ecx, ebx
mov ebp, dword [edi - 0xc]
not ecx
and ecx, dword [edx]
mov byte [esp + 0x13], al
mov eax, ebp
not eax
mov dword [esp + 0x6c], 0
and eax, dword [edx + 4]
or ecx, eax
mov dword [esp + 0x70], 0
jne 0x4bf0d0
mov eax, dword [edx + 8]
mov ecx, eax
mov esi, dword [edx + 0xc]
and ecx, ebx
mov dword [esp + 0x38], eax
mov eax, esi
and eax, ebp
mov dword [esp + 0x3c], esi
or ecx, eax
jne 0x4bf0d0
movzx ecx, word [edi]
mov ax, word [edx + 0x14]
movzx edx, word [edx + 0x12]
add ax, cx
movzx ecx, ax
cmp dx, cx
jl 0x4bec75
movsx esi, cx
movsx ecx, dx
lea eax, [esi + 0x31]
cmp ecx, eax
jle 0x4bec5b
mov esi, edx
jmp 0x4beca1
lea eax, [esi + 0x1f]
cmp ecx, eax
jle 0x4bec67
lea eax, [edx + 1]
jmp 0x4bec9e
sub ecx, esi
movzx eax, byte [ecx + str._n_n_t_t_b_b_a_a_a]
add ax, dx
jmp 0x4bec9e
movsx esi, dx
movsx edx, cx
lea eax, [esi + 0x31]
cmp edx, eax
jle 0x4bec86
mov esi, ecx
jmp 0x4beca1
lea eax, [esi + 0x1f]
cmp edx, eax
jle 0x4bec92
lea eax, [ecx + 1]
jmp 0x4bec9e
sub edx, esi
movzx eax, byte [edx + str._n_n_t_t_b_b_a_a_a]
add ax, cx
movzx esi, ax
movzx ecx, word [edi + 4]
mov di, si
mov dword [esp + 0x14], esi
movsx edx, cx
cmp di, cx
jl 0x4becdf
movsx ecx, di
lea eax, [edx + 0x31]
cmp ecx, eax
jg 0x4bed0f
lea eax, [edx + 0x1f]
cmp ecx, eax
jle 0x4becc8
inc esi
jmp 0x4bed08
sub ecx, edx
movzx eax, byte [ecx + str._n_n_t_t_b_b_a_a_a]
add di, ax
mov word [esp + 0x14], di
mov esi, dword [esp + 0x14]
jmp 0x4bed0f
movsx esi, di
lea eax, [esi + 0x31]
cmp edx, eax
jle 0x4beced
mov esi, ecx
jmp 0x4bed08
lea eax, [esi + 0x1f]
cmp edx, eax
jle 0x4becf9
lea eax, [ecx + 1]
jmp 0x4bed05
sub edx, esi
movzx eax, byte [edx + str._n_n_t_t_b_b_a_a_a]
add ax, cx
movzx esi, ax
mov dword [esp + 0x14], esi
mov di, si
mov edx, dword [esp + 0x24]
or dword [esp + 0x38], ebx
or dword [esp + 0x3c], ebp
mov ax, word [edx + 0x16]
mov edx, dword [esp + 0x18]
movzx ecx, word [edx]
mov edx, dword [esp + 0x24]
add ax, cx
movzx eax, ax
mov dword [esp + 0x60], eax
mov ah, byte [esp + 0x13]
test ah, ah
jns 0x4bed7d
lea eax, [esp + 0x6c]
push eax
push edx
mov edx, dword [esp + 0x80]
push dword [esp + 0x38]
movzx eax, word [edx + 0x22]
push eax
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
push eax
push dword [edx + 8]
push edx
call fcn.004be390
mov edx, dword [esp + 0x88]
add esp, 0x1c
mov ecx, dword [esp + 0x70]
mov ah, al
mov byte [esp + 0x13], al
mov dword [esp + 0x14], edx
jmp 0x4bed8b
mov edx, dword [esp + 0x18]
mov ecx, dword [edx - 8]
mov dword [esp + 0x14], ecx
mov ecx, dword [edx - 4]
mov dword [esp + 0x5c], ecx
test ah, ah
js 0x4bee2e
mov ebp, dword [esp + 0x34]
movsx ecx, ah
cmp ecx, ebp
jge 0x4bee2e
mov eax, dword [esp + 0x58]
cmp word [eax + ecx*2], 0
lea ebx, [eax + ecx*2]
jne 0x4bee11
mov eax, ebp
sub eax, ecx
imul eax, eax, 0x64
cdq
idiv ebp
cdq
push edx
push eax
call fcn.00491c60
sub ax, 0x42
add esp, 8
movzx ebp, ax
mov eax, dword [esp + 0x7c]
cmp ax, 0xa
jg 0x4bedde
xor eax, eax
jmp 0x4bedee
cwde
cdq
push edx
push eax
call fcn.00491c60
cwde
add esp, 8
sub eax, 0x21
mov ecx, dword [esp + 0x7c]
add eax, ebp
add ecx, 0x10
mov edx, 0x400
add eax, ecx
mov ecx, dword [esp + 0x78]
movzx eax, ax
test word [ecx + 0x22], dx
je 0x4bee0e
add eax, 0x10
mov word [ebx], ax
movzx ecx, word [ebx]
movsx edx, cx
cmp di, cx
jl 0x4beec5
movsx ecx, di
lea eax, [edx + 0x31]
cmp ecx, eax
jle 0x4bee9a
mov ah, byte [esp + 0x13]
movzx edx, di
mov ebx, dword [esp + 0x20]
xor ecx, ecx
mov esi, ebx
cmp dword [esp + 0x1c], ecx
jle 0x4bee69
mov ebx, dword [esp + 0x38]
mov ebp, dword [esp + 0x3c]
cmp dword [esi], ebx
jne 0x4bee5b
cmp dword [esi + 4], ebp
jne 0x4bee5b
mov al, byte [esi + 0x16]
xor al, ah
jns 0x4bef08
inc ecx
add esi, 0x20
cmp ecx, dword [esp + 0x1c]
jl 0x4bee47
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
cmp ecx, dword [esp + 0x40]
jl 0x4befe1
mov esi, dword [esp + 0x4c]
cmp dx, si
jg 0x4bf0c7
jne 0x4bee91
cmp di, word [esp + 0x48]
jge 0x4bf0c7
mov esi, dword [esp + 0x44]
jmp 0x4befe8
lea eax, [edx + 0x1f]
cmp ecx, eax
jle 0x4beead
lea eax, [esi + 1]
movzx edx, ax
mov ah, byte [esp + 0x13]
jmp 0x4bee31
sub ecx, edx
movzx eax, byte [ecx + str._n_n_t_t_b_b_a_a_a]
add ax, di
movzx edx, ax
mov ah, byte [esp + 0x13]
jmp 0x4bee31
movsx esi, di
lea eax, [esi + 0x31]
cmp edx, eax
jle 0x4beeda
mov ah, byte [esp + 0x13]
mov edx, ecx
jmp 0x4bee31
lea eax, [esi + 0x1f]
cmp edx, eax
jle 0x4beef0
lea eax, [ecx + 1]
movzx edx, ax
mov ah, byte [esp + 0x13]
jmp 0x4bee31
sub edx, esi
movzx eax, byte [edx + str._n_n_t_t_b_b_a_a_a]
add ax, cx
movzx edx, ax
mov ah, byte [esp + 0x13]
jmp 0x4bee31
cmp ecx, dword [esp + 0x1c]
jge 0x4bee65
movzx eax, word [esi + 0x12]
cmp ax, dx
jl 0x4bef2f
jne 0x4befed
mov ebx, dword [esp + 0x60]
cmp word [esi + 0x10], bx
jg 0x4befed
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x20]
mov edi, dword [esp + 0x18]
mov edx, dword [edx + 0x34]
mov dword [esp + 0x24], edx
test edx, edx
jne 0x4bebe4
mov ebx, dword [esp + 0x78]
mov eax, dword [esp + 0x54]
add edi, 0x20
dec eax
mov dword [esp + 0x18], edi
mov dword [esp + 0x54], eax
jne 0x4bebd5
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x50]
mov edx, dword [esp + 0x28]
mov eax, ebp
mov dword [esp + 0x20], edi
mov ebp, edi
inc esi
mov dword [esp + 0x30], esi
mov edi, eax
mov dword [esp + 0x50], edi
mov eax, ecx
mov dword [esp + 0x54], eax
cmp esi, edx
jl 0x4bebc0
test ecx, ecx
jne 0x4bf186
push str.no_query_solution
push dword [esp + 0x68]
call fcn.00481160
mov ecx, dword [esp + 0x70]
add esp, 8
test ecx, ecx
je 0x4bf112
cmp dword [ecx + 0x208], 0
je 0x4bf0dd
push dword [esp + 0x2c]
push ecx
call fcn.00467960
add esp, 8
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret
mov esi, ecx
inc ecx
mov dword [esp + 0x1c], ecx
shl esi, 5
add esi, ebx
mov eax, dword [esp + 0x24]
mov ebx, dword [esp + 0x18]
mov ecx, dword [eax + 8]
mov eax, dword [eax + 0xc]
or eax, dword [ebx - 0xc]
or ecx, dword [ebx - 0x10]
mov ebx, dword [esp + 0x60]
mov dword [esi + 4], eax
mov eax, dword [esp + 0x14]
mov dword [esi + 8], eax
mov eax, dword [esp + 0x5c]
mov dword [esi + 0xc], eax
mov al, byte [esp + 0x13]
mov byte [esi + 0x16], al
mov eax, dword [esp + 0x30]
mov word [esi + 0x14], di
mov dword [esi], ecx
mov word [esi + 0x10], bx
lea edi, [eax*4]
mov word [esi + 0x12], dx
mov eax, dword [esp + 0x18]
push edi
push dword [eax + 8]
push dword [esi + 0x18]
call sub.MSVCRT.dll_memcpy
mov eax, dword [esi + 0x18]
add esp, 0xc
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x20]
mov dword [edi + eax], edx
mov edi, dword [esp + 0x40]
cmp ecx, edi
jl 0x4bef3b
movzx esi, word [ebp + 0x12]
mov ecx, 1
movzx ebx, word [ebp + 0x10]
mov dword [esp + 0x44], 0
mov dword [esp + 0x4c], esi
mov dword [esp + 0x48], ebx
cmp edi, ecx
jle 0x4bf0be
lea eax, [ebp + 0x32]
jmp 0x4bf090
movzx edx, word [eax]
cmp dx, si
jg 0x4bf0a0
jne 0x4bf0aa
cmp word [eax + 2], bx
jle 0x4bf0aa
movzx ebx, word [eax + 2]
mov esi, edx
mov dword [esp + 0x44], ecx
inc ecx
add eax, 0x20
cmp ecx, edi
jl 0x4bf090
mov edx, dword [esp + 0x24]
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], esi
mov ecx, dword [esp + 0x1c]
jmp 0x4bef3b
mov edx, dword [esp + 0x24]
jmp 0x4bef37
mov ecx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x20]
jmp 0x4bef3f
mov ebx, dword [esp + 0x2c]
cmp ebx, dword [ecx + 0x114]
jb 0x4bf116
cmp ebx, dword [ecx + 0x118]
jae 0x4bf116
mov eax, dword [ecx + 0x110]
pop edi
mov dword [ebx], eax
mov eax, 1
dec dword [ecx + 0xfc]
pop esi
pop ebp
mov dword [ecx + 0x110], ebx
pop ebx
add esp, 0x64
ret
mov ebx, dword [esp + 0x2c]
cmp dword [0x4e2568], 0
je 0x4bf16f
mov eax, dword [0x4e4db0]
test eax, eax
je 0x4bf132
push eax
call dword [0x4e25bc]
add esp, 4
push ebx
call dword [0x4e2598]
sub dword [0x4e4c08], eax
dec dword [0x4e4c2c]
push ebx
call dword [0x4e2590]
mov eax, dword [0x4e4db0]
add esp, 8
test eax, eax
je 0x4bf179
push eax
call dword [0x4e25c4]
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret
push ebx
call dword [0x4e2590]
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x64
ret
cmp eax, 1
jle 0x4bf1a3
lea ecx, [edi + 0x20]
lea edx, [eax - 1]
mov ax, word [edi + 0x12]
cmp ax, word [ecx + 0x12]
jle 0x4bf19d
mov edi, ecx
add ecx, 0x20
dec edx
jne 0x4bf191
mov ebp, dword [esp + 0x28]
xor esi, esi
test ebp, ebp
jle 0x4bf1dc
lea edx, [ebx + 0x30c]
mov eax, dword [edi + 0x18]
lea edx, [edx + 0x50]
mov eax, dword [eax + esi*4]
inc esi
mov dword [edx - 0x3c], eax
mov al, byte [eax + 0x10]
mov byte [edx - 0x50], al
movzx eax, al
lea ecx, [eax + eax*4]
mov eax, dword [ebx + 4]
add ecx, ecx
mov eax, dword [eax + ecx*8 + 0x38]
mov dword [edx - 0x78], eax
cmp esi, ebp
jl 0x4bf1b3
movzx eax, word [ebx + 0x22]
test eax, 0x400
je 0x4bf22c
test eax, 0x200
jne 0x4bf22c
cmp byte [ebx + 0x28], 0
jne 0x4bf22c
cmp word [esp + 0x7c], 0
je 0x4bf22c
lea eax, [esp + 0x6c]
push eax
mov eax, dword [edi + 0x18]
push dword [eax + ebp*4 - 4]
lea eax, [ebp - 1]
push eax
push 0x200
push edi
push dword [ebx + 0xc]
push ebx
call fcn.004be390
movsx ecx, al
add esp, 0x1c
mov eax, dword [ebx + 0xc]
cmp ecx, dword [eax]
jne 0x4bf22c
mov byte [ebx + 0x28], 2
mov ecx, dword [ebx + 8]
test ecx, ecx
je 0x4bf2c8
movzx edx, word [ebx + 0x22]
test edx, 0x200
je 0x4bf251
movsx eax, byte [edi + 0x16]
cmp eax, dword [ecx]
jne 0x4bf26b
mov byte [ebx + 0x28], 2
jmp 0x4bf26b
mov al, byte [edi + 0x16]
mov byte [ebx + 0x24], al
test al, al
jns 0x4bf25f
mov byte [ebx + 0x24], 0
mov eax, dword [edi + 8]
mov dword [ebx + 0x18], eax
mov eax, dword [edi + 0xc]
mov dword [ebx + 0x1c], eax
test edx, 0x800
je 0x4bf2c8
movsx eax, byte [ebx + 0x24]
cmp eax, dword [ecx]
jne 0x4bf2c8
test ebp, ebp
jle 0x4bf2c8
lea eax, [esp + 0x6c]
mov dword [esp + 0x6c], 0
push eax
mov eax, dword [edi + 0x18]
mov dword [esp + 0x74], 0
push dword [eax + ebp*4 - 4]
lea eax, [ebp - 1]
push eax
push 0
push edi
push ecx
push ebx
call fcn.004be390
movsx ecx, al
add esp, 0x1c
mov eax, dword [ebx + 8]
cmp ecx, dword [eax]
jne 0x4bf2c8
mov eax, dword [esp + 0x6c]
mov dword [ebx + 0x18], eax
mov eax, dword [esp + 0x70]
mov byte [ebx + 0x25], 1
mov dword [ebx + 0x1c], eax
mov ax, word [edi + 0x10]
mov ecx, dword [esp + 0x68]
mov word [ebx + 0x20], ax
test ecx, ecx
je 0x4bf32a
cmp dword [ecx + 0x208], 0
je 0x4bf2f8
push dword [esp + 0x2c]
push ecx
call fcn.00467960
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret
mov ebx, dword [esp + 0x2c]
cmp ebx, dword [ecx + 0x114]
jb 0x4bf32e
cmp ebx, dword [ecx + 0x118]
jae 0x4bf32e
mov eax, dword [ecx + 0x110]
pop edi
mov dword [ebx], eax
dec dword [ecx + 0xfc]
xor eax, eax
pop esi
pop ebp
mov dword [ecx + 0x110], ebx
pop ebx
add esp, 0x64
ret
mov ebx, dword [esp + 0x2c]
cmp dword [0x4e2568], 0
je 0x4bf384
mov eax, dword [0x4e4db0]
test eax, eax
je 0x4bf34a
push eax
call dword [0x4e25bc]
add esp, 4
push ebx
call dword [0x4e2598]
sub dword [0x4e4c08], eax
dec dword [0x4e4c2c]
push ebx
call dword [0x4e2590]
mov eax, dword [0x4e4db0]
add esp, 8
test eax, eax
je 0x4bf38e
push eax
call dword [0x4e25c4]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret
push ebx
call dword [0x4e2590]
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x64
ret