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

Disassembly:
sub esp, 0x48
push ebx
push ebp
push esi
mov esi, eax
mov eax, dword [esi + 4]
push edi
xor edi, edi
cmp eax, edi
je 0x40b24c
mov ecx, dword [esi + 8]
sub ecx, eax
mov eax, 0x88888889
imul ecx
add edx, ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
jne 0x40b251
call fcn.0045d601
mov eax, dword [esi + 4]
cmp byte [eax + 0x10], 0
je 0x40b576
mov dword [esp + 0x18], edi
mov edi, dword [esp + 0x5c]
mov ebp, dword [edi + 4]
mov ebx, dword [ebp]
mov dword [esp + 0x24], ebp
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x14], 0
lea esp, [esp]
cmp dword [esp + 0x5c], edi
je 0x40b28b
call fcn.0045d601
cmp ebp, ebx
je 0x40b4c7
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x5c]
cmp ecx, dword [edx + 4]
jne 0x40b2a5
call fcn.0045d601
mov eax, dword [esp + 0x2c]
mov eax, dword [eax]
cmp ebp, eax
mov dword [esp + 0x2c], eax
jne 0x40b397
test edi, edi
jne 0x40b2c0
call fcn.0045d601
cmp ebx, dword [edi + 4]
jne 0x40b2ca
call fcn.0045d601
mov edi, dword [esi + 4]
cmp edi, dword [esi + 8]
jbe 0x40b2d7
call fcn.0045d601
mov eax, dword [ebx + 8]
mov ecx, eax
shl ecx, 4
sub ecx, eax
mov dword [esp + 0x20], edi
lea edi, [edi + ecx*4]
cmp edi, dword [esi + 8]
ja 0x40b2f2
cmp edi, dword [esi + 4]
jae 0x40b2f7
call fcn.0045d601
mov edx, dword [esp + 0x14]
lea ebp, [edx + edi]
cmp ebp, dword [esi + 8]
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], edi
ja 0x40b310
cmp ebp, dword [esi + 4]
jae 0x40b315
call fcn.0045d601
mov eax, dword [esi + 8]
cmp dword [esi + 4], eax
mov dword [esp + 0x1c], eax
jbe 0x40b326
call fcn.0045d601
mov eax, dword [esp + 0x5c]
cmp ebx, dword [eax + 4]
jne 0x40b334
call fcn.0045d601
mov edi, dword [esi + 4]
cmp edi, dword [esi + 8]
jbe 0x40b341
call fcn.0045d601
mov ebx, dword [ebx + 8]
mov eax, ebx
shl eax, 4
sub eax, ebx
lea ebx, [edi + eax*4]
cmp ebx, dword [esi + 8]
mov dword [esp + 0x44], edi
ja 0x40b35c
cmp ebx, dword [esi + 4]
jae 0x40b361
call fcn.0045d601
add ebx, 0x3c
cmp ebx, dword [esi + 8]
ja 0x40b36e
cmp ebx, dword [esi + 4]
jae 0x40b373
call fcn.0045d601
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x24]
push ebp
push ecx
mov ecx, dword [esp + 0x2c]
push edx
mov edx, dword [esp + 0x28]
push eax
push ecx
push edx
push ebx
lea ebx, [esp + 0x64]
jmp 0x40b4a4
test edi, edi
jne 0x40b3a0
call fcn.0045d601
cmp ebx, dword [edi + 4]
jne 0x40b3aa
call fcn.0045d601
mov edi, dword [esi + 4]
cmp edi, dword [esi + 8]
jbe 0x40b3b7
call fcn.0045d601
mov eax, dword [ebx + 8]
mov ecx, eax
shl ecx, 4
sub ecx, eax
mov dword [esp + 0x44], edi
lea edi, [edi + ecx*4]
cmp edi, dword [esi + 8]
ja 0x40b3d2
cmp edi, dword [esi + 4]
jae 0x40b3d7
call fcn.0045d601
mov edx, dword [esp + 0x14]
mov dword [esp + 0x3c], edi
add edi, edx
cmp edi, dword [esi + 8]
mov dword [esp + 0x38], esi
mov dword [esp + 0x1c], edi
ja 0x40b3f3
cmp edi, dword [esi + 4]
jae 0x40b3f8
call fcn.0045d601
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x5c]
cmp eax, dword [ecx + 4]
jne 0x40b40a
call fcn.0045d601
mov ebp, dword [esi + 4]
cmp ebp, dword [esi + 8]
jbe 0x40b417
call fcn.0045d601
mov edx, dword [esp + 0x2c]
mov eax, dword [edx + 8]
mov ecx, eax
shl ecx, 4
sub ecx, eax
lea ebp, [ebp + ecx*4]
cmp ebp, dword [esi + 8]
ja 0x40b433
cmp ebp, dword [esi + 4]
jae 0x40b438
call fcn.0045d601
mov eax, dword [esp + 0x5c]
cmp ebx, dword [eax + 4]
jne 0x40b446
call fcn.0045d601
mov edi, dword [esi + 4]
cmp edi, dword [esi + 8]
jbe 0x40b453
call fcn.0045d601
mov ebx, dword [ebx + 8]
mov edx, ebx
shl edx, 4
sub edx, ebx
mov dword [esp + 0x44], edi
lea edi, [edi + edx*4]
cmp edi, dword [esi + 8]
ja 0x40b46e
cmp edi, dword [esi + 4]
jae 0x40b473
call fcn.0045d601
add edi, 0x3c
cmp edi, dword [esi + 8]
ja 0x40b480
cmp edi, dword [esi + 4]
jae 0x40b485
call fcn.0045d601
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x24]
push eax
mov eax, dword [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x2c]
push edx
push eax
push ecx
push ebp
push edi
lea ebx, [esp + 0x6c]
call fcn.0040bb50
add dword [esp + 0x34], 1
mov edi, dword [esp + 0x78]
mov ebx, dword [esp + 0x48]
mov ebp, dword [esp + 0x40]
add esp, 0x1c
sub dword [esp + 0x14], 0x3c
jmp 0x40b280
mov eax, dword [esi + 4]
test eax, eax
jne 0x40b4d2
xor ecx, ecx
jmp 0x40b4ea
mov ecx, dword [esi + 8]
sub ecx, eax
mov eax, 0x88888889
imul ecx
add edx, ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov eax, dword [0x4a6d24]
mov edx, dword [0x4a6d20]
sub ecx, dword [esp + 0x18]
mov edi, eax
mov ebx, edx
sub esp, 0x3c
mov dword [esp + 0x78], eax
mov eax, esp
mov dword [eax], edx
mov ebp, dword [0x4a6d24]
mov dword [eax + 8], edx
mov dword [eax + 4], ebp
mov dword [eax + 0xc], edi
mov byte [eax + 0x10], 0
mov dword [eax + 0x14], ebx
mov dword [eax + 0x1c], 0
mov byte [eax + 0x20], 0
mov edx, edi
mov dword [eax + 0x18], edx
mov edx, dword [0x4a6d14]
mov dword [eax + 0x24], edx
mov edx, dword [0x4a6d18]
mov dword [eax + 0x28], edx
movzx edx, byte [0x4a6d1c]
mov byte [eax + 0x2c], dl
mov edx, dword [0x4a6d14]
mov dword [eax + 0x30], edx
mov edx, dword [0x4a6d18]
mov dword [eax + 0x34], edx
movzx edx, byte [0x4a6d1c]
mov byte [eax + 0x38], dl
push ecx
mov eax, esi
call fcn.0040b130
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret
cmp eax, edi
je 0x40b592
mov ecx, dword [esi + 8]
sub ecx, eax
mov eax, 0x88888889
imul ecx
add edx, ecx
sar edx, 5
mov edi, edx
shr edi, 0x1f
add edi, edx
mov eax, dword [esp + 0x5c]
mov ecx, dword [0x4a6d24]
mov ebx, dword [eax + 8]
mov edx, dword [0x4a6d20]
sub esp, 0x3c
mov eax, esp
push ecx
push edx
push ecx
push edx
call fcn.0040aa20
sub edi, ebx
push edi
mov eax, esi
call fcn.0040b130
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret