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

Disassembly:
sub esp, 0x60
push ebx
mov ebx, dword [esp + 0x68]
push ebp
push esi
mov eax, dword [ebx + 0x70]
push edi
xor edi, edi
mov dword [esp + 0x18], ecx
cmp eax, edi
mov dword [esp + 0x10], edi
jne 0x40b075
mov ecx, dword [ebx + 8]
cmp ecx, edi
jne 0x40ad5d
mov dword [esp + 0x14], edi
jmp 0x40ad69
mov eax, dword [ebx + 0xc]
sub eax, ecx
sar eax, 2
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x14]
mov eax, 1
cmp ecx, eax
mov dword [esp + 0x1c], eax
jle 0x40ae90
mov ecx, dword [ebx + 8]
lea edx, [esp + 0x20]
push edx
mov dword [esp + 0x28], edi
mov eax, dword [ecx + eax*4]
lea ecx, [ebx + 0x14]
mov dword [esp + 0x14], eax
mov dword [esp + 0x24], eax
lea eax, [esp + 0x4c]
push eax
call fcn.0040ce80
mov eax, dword [eax]
mov ebp, dword [eax + 0x10]
mov eax, dword [esp + 0x10]
cmp eax, 0xffffffff
je 0x40ae7b
cmp ebp, edi
jl 0x40ae7b
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x28], eax
lea edx, [esp + 0x28]
lea eax, [esp + 0x50]
lea ebx, [ecx + 4]
push edx
push eax
mov ecx, ebx
mov dword [esp + 0x34], edi
call fcn.0040d220
mov eax, dword [eax]
mov esi, dword [eax + 0x10]
cmp esi, edi
je 0x40ae77
mov eax, dword [esi + 0x9c]
lea edx, [esp + 0x30]
sub eax, ebp
push edx
mov dword [esi + 0x9c], eax
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x34], ecx
mov ecx, dword [esp + 0x78]
lea eax, [esp + 0x5c]
add ecx, 0x14
push eax
mov dword [esp + 0x3c], edi
call fcn.0040ce80
mov eax, dword [eax]
mov dword [eax + 0x10], edi
mov eax, dword [esi + 0x9c]
cmp eax, edi
jg 0x40ae77
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x38]
lea ecx, [esp + 0x60]
push eax
push ecx
mov ecx, ebx
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], edi
call fcn.0040d220
mov ecx, esi
call fcn.004054b0
push esi
call fcn.00485136
mov edx, dword [esp + 0x14]
add esp, 4
lea eax, [esp + 0x40]
lea ecx, [esp + 0x68]
push eax
push ecx
mov ecx, ebx
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], edi
call fcn.0040d220
mov eax, dword [eax]
mov dword [eax + 0x10], edi
mov ebx, dword [esp + 0x74]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
inc eax
cmp eax, ecx
mov dword [esp + 0x1c], eax
jl 0x40ad7e
mov eax, dword [ebx + 0xf8]
cmp eax, 0xffffffff
je 0x40aef8
mov edx, dword [esp + 0x18]
mov dword [esp + 0x40], eax
lea eax, [esp + 0x40]
lea ecx, [esp + 0x68]
lea esi, [edx + 4]
push eax
push ecx
mov ecx, esi
mov dword [esp + 0x4c], edi
call fcn.0040d220
mov eax, dword [eax]
mov ebp, dword [eax + 0x10]
cmp ebp, edi
je 0x40aef8
mov ecx, ebp
call fcn.004054b0
push ebp
call fcn.00485136
mov edx, dword [ebx + 0xf8]
add esp, 4
lea eax, [esp + 0x40]
lea ecx, [esp + 0x68]
push eax
push ecx
mov ecx, esi
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], edi
call fcn.0040d220
mov eax, dword [eax]
mov dword [eax + 0x10], edi
mov eax, dword [ebx + 0xfc]
cmp eax, 0xffffffff
je 0x40af60
mov edx, dword [esp + 0x18]
mov dword [esp + 0x40], eax
lea eax, [esp + 0x40]
lea ecx, [esp + 0x68]
lea esi, [edx + 4]
push eax
push ecx
mov ecx, esi
mov dword [esp + 0x4c], edi
call fcn.0040d220
mov eax, dword [eax]
mov ebp, dword [eax + 0x10]
cmp ebp, edi
je 0x40af60
mov ecx, ebp
call fcn.004054b0
push ebp
call fcn.00485136
mov edx, dword [ebx + 0xfc]
add esp, 4
lea eax, [esp + 0x40]
lea ecx, [esp + 0x68]
push eax
push ecx
mov ecx, esi
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], edi
call fcn.0040d220
mov eax, dword [eax]
mov dword [eax + 0x10], edi
mov ecx, dword [ebx + 0x140]
lea eax, [ebx + 0x140]
cmp ecx, 0xffffffff
je 0x40afdc
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x74]
push ecx
push eax
lea ecx, [esp + 0x70]
mov dword [esp + 0x7c], edi
lea esi, [edx + 4]
call fcn.0040d390
lea edx, [esp + 0x60]
push eax
push edx
mov ecx, esi
call fcn.0040d220
mov eax, dword [eax]
mov ebp, dword [eax + 0x10]
cmp ebp, edi
je 0x40afdc
mov ecx, ebp
call fcn.004054b0
push ebp
call fcn.00485136
add esp, 4
lea eax, [esp + 0x74]
lea ecx, [esp + 0x68]
mov dword [esp + 0x74], edi
push eax
lea eax, [ebx + 0x140]
push eax
call fcn.0040d390
lea ecx, [esp + 0x60]
push eax
push ecx
mov ecx, esi
call fcn.0040d220
mov eax, dword [eax]
mov dword [eax + 0x10], edi
mov ecx, dword [ebx + 0xac]
cmp ecx, edi
jne 0x40afec
mov dword [esp + 0x14], edi
jmp 0x40affb
mov eax, dword [ebx + 0xb0]
sub eax, ecx
sar eax, 2
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x14]
xor ebp, ebp
cmp eax, edi
jle 0x40b075
mov edx, dword [esp + 0x18]
add edx, 4
mov dword [esp + 0x74], edx
mov eax, dword [ebx + 0xac]
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0x20], edi
mov ecx, dword [eax + ebp*4]
lea eax, [esp + 0x14]
mov dword [esp + 0x14], ecx
push eax
lea ecx, [esp + 0x70]
call fcn.0040d390
lea ecx, [esp + 0x60]
push eax
push ecx
mov ecx, dword [esp + 0x7c]
call fcn.0040d220
mov eax, dword [eax]
mov esi, dword [eax + 0x10]
cmp esi, edi
je 0x40b06c
mov ecx, esi
call fcn.004054b0
push esi
call fcn.00485136
mov ecx, dword [esp + 0x78]
add esp, 4
lea edx, [esp + 0x10]
push edx
call fcn.0040d1e0
mov dword [eax], edi
mov eax, dword [esp + 0x14]
inc ebp
cmp ebp, eax
jl 0x40b010
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret 4