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

Disassembly:
sub esp, 0x68
push ebp
mov ebp, dword [esp + 0x70]
push esi
xor esi, esi
mov dword [esp + 0x1c], 0
push edi
mov eax, dword [ebp]
xor edi, edi
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], edi
mov eax, dword [eax]
mov dword [esp + 0x34], eax
cmp word [esp + 0x88], si
je 0x4be3d0
test byte [eax + 0x3c], 0x80
je 0x4be3d0
pop edi
pop esi
xor al, al
pop ebp
add esp, 0x68
ret
mov eax, dword [esp + 0x7c]
movzx eax, word [eax]
mov dword [esp + 0x54], eax
cmp eax, 0x3f
ja 0x4be3c7
movzx ecx, ax
xor edx, edx
push ebx
mov eax, 1
mov byte [esp + 0x12], 1
mov dword [esp + 0x20], ecx
call fcn.00402540
mov ebx, dword [esp + 0x20]
add eax, 0xffffffff
mov ecx, edx
mov dword [esp + 0x50], eax
mov dl, byte [esp + 0x12]
adc ecx, 0xffffffff
mov dword [esp + 0x2c], ecx
xor ecx, ecx
mov dword [esp + 0x40], esi
mov dword [esp + 0x44], esi
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x28], ecx
jmp 0x4be430
mov eax, dword [esp + 0x2c]
cmp edi, eax
ja 0x4be9ca
jb 0x4be448
cmp esi, dword [esp + 0x50]
jae 0x4be9ce
movzx eax, word [esp + 0x8c]
cmp ecx, eax
jg 0x4be9c6
test ecx, ecx
jle 0x4be47e
mov ecx, dword [esp + 0x24]
mov ebp, dword [esp + 0x30]
or ebp, dword [ecx + 8]
mov dword [esp + 0x30], ebp
mov ebp, dword [esp + 0x34]
or ebp, dword [ecx + 0xc]
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x34], ebp
mov ebp, dword [esp + 0x7c]
cmp ecx, eax
jge 0x4be491
mov eax, dword [esp + 0x84]
mov eax, dword [eax + 0x18]
mov eax, dword [eax + ecx*4]
jmp 0x4be498
mov eax, dword [esp + 0x90]
test dword [eax + 0x24], 0x400
mov dword [esp + 0x24], eax
jne 0x4be9c0
movzx eax, byte [eax + 0x10]
lea ecx, [eax + eax*4]
mov eax, dword [ebp + 4]
shl ecx, 4
xor ebp, ebp
mov eax, dword [ecx + eax + 0x38]
mov dword [esp + 0x48], eax
test ebx, ebx
jle 0x4be5ef
xor ebx, ebx
lea ebx, [ebx]
mov eax, 1
xor edx, edx
mov ecx, ebp
call fcn.00402540
mov ecx, eax
mov dword [esp + 0x4c], eax
mov eax, edx
mov dword [esp + 0x3c], edx
and ecx, esi
and eax, edi
or ecx, eax
jne 0x4be5dd
mov eax, dword [esp + 0x80]
mov eax, dword [eax + 4]
push dword [ebx + eax]
call fcn.00484db0
mov esi, eax
add esp, 4
cmp byte [esi], 0x9a
jne 0x4be5d9
mov edx, dword [esp + 0x48]
cmp dword [esi + 0x1c], edx
jne 0x4be5d9
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
not eax
push 0
push 0x182
push eax
movsx eax, word [esi + 0x20]
not ecx
push ecx
push eax
mov eax, dword [esp + 0x90]
push edx
add eax, 0x148
push eax
call fcn.004b2ad0
mov edi, eax
add esp, 0x1c
test edi, edi
je 0x4be5d5
test byte [edi + 0x12], 0x82
je 0x4be5bb
cmp word [esi + 0x20], 0
jl 0x4be5bb
mov eax, dword [esp + 0x80]
mov eax, dword [eax + 4]
push dword [ebx + eax]
mov eax, dword [esp + 0x80]
push dword [eax]
call fcn.004839f0
add esp, 8
test eax, eax
jne 0x4be58f
mov eax, dword [esp + 0x38]
mov eax, dword [eax + 8]
mov esi, dword [eax]
mov eax, dword [esp + 0x7c]
push dword [edi]
push dword [eax]
call fcn.004839f0
add esp, 8
test eax, eax
jne 0x4be5ac
mov eax, dword [esp + 0x38]
mov eax, dword [eax + 8]
push dword [eax]
push esi
call fcn.0043ae40
add esp, 8
test eax, eax
jne 0x4be5d5
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x1c]
or esi, dword [esp + 0x4c]
or edi, dword [esp + 0x3c]
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], edi
jmp 0x4be5dd
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
inc ebp
add ebx, 0x18
cmp ebp, dword [esp + 0x20]
jl 0x4be4d0
mov ebx, dword [esp + 0x20]
mov esi, dword [esp + 0x24]
mov eax, dword [esi + 0x24]
test eax, 0x1000
jne 0x4be88b
test eax, 0x100
je 0x4be617
xor edx, edx
mov dword [esp + 0x3c], edx
mov dword [esp + 0x4c], edx
lea eax, [edx + 1]
jmp 0x4be645
mov edx, dword [esi + 0x1c]
mov dword [esp + 0x3c], edx
test edx, edx
je 0x4bea29
test byte [edx + 0x34], 4
jne 0x4bea29
movzx eax, word [edx + 0x2e]
cmp byte [edx + 0x32], 0
mov dword [esp + 0x4c], eax
movzx eax, word [edx + 0x30]
setne byte [esp + 0x12]
movzx eax, ax
xor cl, cl
xor ebp, ebp
mov byte [esp + 0x16], 0
mov byte [esp + 0x15], 0
mov byte [esp + 0x17], cl
mov dword [esp + 0x54], eax
test eax, eax
jle 0x4be88b
movzx ecx, word [esi + 0x18]
cmp ebp, ecx
jge 0x4be69b
cmp word [esi + 0x2a], 0
jne 0x4be69b
mov eax, dword [esi + 0x30]
mov eax, dword [eax + ebp*4]
movzx eax, word [eax + 0x12]
test eax, 0x182
je 0x4be69b
test eax, 0x100
je 0x4be873
mov byte [esp + 0x12], 0
jmp 0x4be873
test edx, edx
je 0x4be6bd
mov eax, dword [edx + 4]
movsx ebx, word [eax + ebp*2]
mov eax, dword [edx + 0x1c]
mov al, byte [eax + ebp]
mov byte [esp + 0x14], al
mov eax, dword [edx + 0xc]
movsx eax, word [eax + 0x20]
cmp ebx, eax
jne 0x4be6c5
jmp 0x4be6c2
mov byte [esp + 0x14], 0
or ebx, 0xffffffff
cmp byte [esp + 0x12], 0
je 0x4be6e9
test ebx, ebx
js 0x4be6e9
cmp ebp, ecx
jl 0x4be6e9
mov eax, dword [edx + 0xc]
lea ecx, [ebx + ebx*2]
mov eax, dword [eax + 4]
mov al, byte [eax + ecx*8 + 0x14]
neg al
sbb al, al
and byte [esp + 0x12], al
xor esi, esi
mov byte [esp + 0x13], 1
xor edi, edi
cmp esi, dword [esp + 0x20]
jge 0x4be7c6
mov eax, 1
xor edx, edx
mov ecx, esi
call fcn.00402540
and eax, dword [esp + 0x18]
and edx, dword [esp + 0x1c]
or eax, edx
jne 0x4be7b7
mov eax, dword [esp + 0x80]
mov eax, dword [eax + 4]
mov edx, dword [edi + eax]
mov eax, edx
test eax, eax
je 0x4be754
lea ecx, [ecx]
mov ecx, dword [eax + 4]
test ecx, 0x1000
je 0x4be754
test ecx, 0x40000
je 0x4be74d
mov eax, dword [eax + 0x14]
mov eax, dword [eax + 4]
mov eax, dword [eax]
jmp 0x4be750
mov eax, dword [eax + 0xc]
test eax, eax
jne 0x4be730
mov ecx, dword [esp + 0x88]
and ecx, 0x300
neg ecx
sbb cl, cl
and byte [esp + 0x13], cl
cmp byte [eax], 0x9a
jne 0x4be7b7
mov ecx, dword [esp + 0x48]
cmp dword [eax + 0x1c], ecx
jne 0x4be7b7
movsx eax, word [eax + 0x20]
cmp eax, ebx
jne 0x4be7b7
test ebx, ebx
js 0x4be7f0
mov eax, dword [esp + 0x7c]
push edx
push dword [eax]
call fcn.004839f0
mov ecx, eax
add esp, 8
test ecx, ecx
jne 0x4be79f
mov eax, dword [esp + 0x38]
mov ecx, dword [eax + 8]
mov eax, dword [esp + 0x3c]
mov eax, dword [eax + 0x20]
push dword [eax + ebp*4]
push dword [ecx]
call fcn.0043ae40
add esp, 8
test eax, eax
je 0x4be7f0
inc esi
add edi, 0x18
cmp byte [esp + 0x13], 0
jne 0x4be6f2
test ebp, ebp
je 0x4be7d5
mov eax, dword [esp + 0x4c]
movzx eax, ax
cmp ebp, eax
jge 0x4be7da
mov byte [esp + 0x12], 0
mov cl, byte [esp + 0x17]
test cl, cl
je 0x4be887
mov byte [esp + 0x12], 1
jmp 0x4be896
test dword [esp + 0x88], 0x100
jne 0x4be850
cmp byte [esp + 0x16], 0
lea ecx, [esi + esi*2]
mov eax, dword [esp + 0x80]
mov eax, dword [eax + 4]
je 0x4be821
mov dl, byte [esp + 0x14]
xor dl, byte [esp + 0x15]
cmp dl, byte [eax + ecx*8 + 0xc]
jne 0x4be7c6
jmp 0x4be850
mov al, byte [eax + ecx*8 + 0xc]
xor al, byte [esp + 0x14]
mov byte [esp + 0x15], al
je 0x4be84b
mov ecx, dword [esp + 0x28]
mov eax, 1
xor edx, edx
call fcn.00402540
mov ecx, dword [esp + 0x94]
or dword [ecx], eax
or dword [ecx + 4], edx
mov byte [esp + 0x16], 1
test ebx, ebx
jns 0x4be859
mov byte [esp + 0x17], 1
mov eax, 1
xor edx, edx
mov ecx, esi
call fcn.00402540
or dword [esp + 0x18], eax
or dword [esp + 0x1c], edx
mov esi, dword [esp + 0x24]
inc ebp
cmp ebp, dword [esp + 0x54]
jge 0x4be7da
mov edx, dword [esp + 0x3c]
jmp 0x4be666
mov ebx, dword [esp + 0x20]
cmp byte [esp + 0x12], 0
je 0x4be99e
mov eax, dword [esp + 0x24]
xor esi, esi
mov ecx, dword [esp + 0x40]
or ecx, dword [eax + 8]
mov dword [esp + 0x40], ecx
mov ecx, dword [esp + 0x44]
or ecx, dword [eax + 0xc]
mov dword [esp + 0x44], ecx
cmp dword [esp + 0x20], esi
jle 0x4be99a
xor edi, edi
mov edi, edi
mov eax, 1
xor edx, edx
mov ecx, esi
call fcn.00402540
mov ecx, eax
mov dword [esp + 0x4c], eax
and ecx, dword [esp + 0x18]
mov eax, edx
and eax, dword [esp + 0x1c]
or ecx, eax
mov dword [esp + 0x48], edx
jne 0x4be98c
mov eax, dword [esp + 0x80]
mov eax, dword [eax + 4]
mov ebx, dword [edi + eax]
mov eax, dword [esp + 0x7c]
add eax, 0x44
push ebx
push eax
call fcn.004b2a30
mov ecx, edx
add esp, 8
mov ebp, eax
mov dword [esp + 0x54], ecx
or eax, ecx
jne 0x4be95e
mov dword [esp + 0x74], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x74], eax
lea eax, [esp + 0x5c]
push ebx
push eax
mov byte [esp + 0x78], 1
mov dword [esp + 0x64], 0x44f4b0
mov dword [esp + 0x68], 0x4757a0
call fcn.004afa60
add esp, 8
cmp byte [esp + 0x70], 0
je 0x4be98c
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x44]
not ecx
not eax
and ecx, ebp
and eax, dword [esp + 0x54]
or ecx, eax
jne 0x4be98c
mov eax, dword [esp + 0x18]
or eax, dword [esp + 0x4c]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x1c]
or eax, dword [esp + 0x48]
mov dword [esp + 0x1c], eax
inc esi
add edi, 0x18
cmp esi, dword [esp + 0x20]
jl 0x4be8c0
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x28]
mov dl, byte [esp + 0x12]
inc ecx
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
mov dword [esp + 0x28], ecx
test dl, dl
je 0x4be9c6
mov ebp, dword [esp + 0x7c]
jmp 0x4be430
cmp byte [eax + 0x1d], 0
jne 0x4be9d4
mov eax, dword [esp + 0x2c]
cmp esi, dword [esp + 0x50]
jne 0x4be9e0
cmp edi, eax
jne 0x4be9e0
mov al, byte [esp + 0x58]
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x68
ret
test dl, dl
jne 0x4bea33
mov eax, dword [esp + 0x20]
lea ebx, [eax - 1]
test ebx, ebx
jle 0x4bea29
nop
mov eax, 1
xor edx, edx
mov ecx, ebx
call fcn.00402540
add eax, 0xffffffff
mov ecx, eax
adc edx, 0xffffffff
and ecx, esi
mov esi, edx
and esi, edi
cmp ecx, eax
jne 0x4bea14
cmp esi, edx
je 0x4bea1f
dec ebx
test ebx, ebx
jle 0x4bea29
mov esi, dword [esp + 0x18]
jmp 0x4be9f0
mov al, bl
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x68
ret
pop ebx
pop edi
pop esi
xor al, al
pop ebp
add esp, 0x68
ret
pop ebx
pop edi
pop esi
or al, 0xff
pop ebp
add esp, 0x68
ret