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

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
mov esi, dword [esp + 0x20]
push edi
mov ebx, dword [esi + 0x14]
test ebx, ebx
je 0x40aee9
cmp byte [esi + 0x4e], 1
jne 0x40ae55
push esi
call fcn.0040ab10
add esp, 4
mov edi, dword [esp + 0x20]
push 1
push edi
call fcn.0040b4d0
push edi
call fcn.0040a3e0
mov ecx, ebx
mov ebp, eax
shr ecx, 3
add esp, 0xc
add ecx, ebx
cmp ebp, ecx
jae 0x40aea9
push esi
push edi
call fcn.0040a4d0
mov ecx, dword [esi + 0xc]
mov eax, 0x51eb851f
add ecx, dword [esi + 8]
mul ecx
movzx eax, byte [esi + 0x50]
shr edx, 5
imul edx, eax
neg edx
push edx
push esi
call fcn.00413ff0
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
mov eax, dword [esi + 0xc]
add eax, dword [esi + 8]
mov dword [esi + 0x10], eax
mov esi, dword [edi + 0x10]
lea eax, [esi + 0x58]
mov byte [esi + 0x4d], 3
push eax
push edi
call fcn.0040cb60
push 0x100
push edi
mov dword [esi + 0x5c], eax
call fcn.0040b4d0
mov esi, dword [esp + 0x34]
push esi
call fcn.0040c3a0
add esp, 0x14
mov dword [esi + 0x14], ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
cmp dword [esi + 0xc], 0
lea ebx, [esi + 8]
mov ebp, dword [esi + 0x10]
mov dword [esp + 0x18], ebp
mov dword [esp + 0x14], ebx
jle 0x40af4f
movzx edi, byte [esi + 0x51]
mov eax, 0x51eb851f
mov ecx, dword [ebx]
add ecx, dword [esi + 0xc]
mul ebp
shr edx, 5
imul edi, edx
shl edi, 2
lea eax, [edi + ebp]
cmp ecx, eax
jbe 0x40af53
push esi
push dword [esp + 0x24]
call fcn.0040add0
mov ecx, dword [esi + 0xc]
add esp, 8
add ecx, dword [ebx]
shr edi, 1
add edi, ebp
cmp ecx, edi
jb 0x40b09a
push esi
mov dword [esi + 0x14], eax
call fcn.0040c3a0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
mov dword [esp + 0x14], ebx
mov eax, dword [esi + 0x8c]
lea ebx, [esi + 0x8c]
mov dword [esp + 0x10], ebx
test eax, eax
je 0x40af7d
push dword [esi + 0x88]
push eax
push esi
call fcn.0040b960
add esp, 0xc
mov dword [ebx], 0
push dword [esi + 0x98]
push dword [esi + 0x60]
push esi
call fcn.0040b960
push 0
push dword [esi + 0x78]
lea ebp, [esi + 0x78]
push esi
call fcn.0040b960
mov ebx, dword [esp + 0x38]
push ebx
call fcn.0040a3e0
lea eax, [esi + 0x8c]
mov byte [esi + 0x4d], 3
push eax
push dword [esi + 0x80]
lea edi, [esi + 0x58]
push edi
push esi
push ebx
call fcn.0040c770
push dword [esp + 0x40]
mov esi, eax
mov eax, dword [esp + 0x58]
push dword [eax + 0x84]
push esi
push eax
push ebx
call fcn.0040c770
mov ecx, dword [esp + 0x68]
add esp, 0x44
mov dword [esp + 0x10], 0
mov eax, dword [ecx + 0x84]
mov dword [ecx + 0x88], eax
mov eax, dword [esi]
mov dword [ecx + 0x84], eax
mov eax, dword [edi]
lea edi, [ecx + 0x60]
mov dword [ecx + 0x80], eax
lea eax, [esp + 0x10]
push eax
push dword [ecx + 0x90]
push edi
push ecx
push ebx
call fcn.0040c770
mov esi, eax
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x3c]
push dword [eax + 0x94]
push esi
push eax
push ebx
call fcn.0040c770
mov ecx, dword [esp + 0x4c]
mov eax, dword [ecx + 0x94]
mov dword [ecx + 0x98], eax
mov eax, dword [esi]
mov esi, ecx
mov dword [esi + 0x94], eax
mov eax, dword [edi]
mov dword [esi + 0x90], eax
lea eax, [esp + 0x38]
push eax
push 0
push ebp
push esi
push ebx
call fcn.0040c770
push esi
push ebx
call fcn.0040abc0
mov ecx, dword [esp + 0x58]
mov eax, 0x51eb851f
add esp, 0x44
mov ecx, dword [ecx]
add ecx, dword [esi + 0xc]
mul ecx
movzx eax, byte [esi + 0x50]
shr edx, 5
imul edx, eax
neg edx
push edx
push esi
call fcn.00413ff0
mov eax, dword [esp + 0x20]
add esp, 8
mov dword [esi + 0x10], eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret