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

Disassembly:
sub esp, 8
push ebx
mov ebx, dword [ecx + 8]
push ebp
push esi
push edi
mov eax, dword [ebx + 0x78]
mov edx, dword [ebx + 0xc]
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 0x38]
mov dword [esp + 0x14], ecx
mov dword [ebx + 0x78], 0xfffffffd
lea ebp, [eax + eax*4]
mov eax, 0x7fffff00
add ebp, ebp
cmove ebp, eax
mov eax, dword [ebx + 8]
cmp eax, edx
jbe 0x40d4a0
sub eax, edx
add dword [ebx + 0x30], eax
nop dword [eax + eax]
mov esi, dword [ecx + 8]
movzx eax, byte [esi + 0x11]
cmp eax, 5
ja case.default.0x40d4b0
jmp dword [eax*4 + 0x40d6f0]
mov eax, dword [esi + 0x7c]
mov dword [esi + 0x20], 0
mov dword [esi + 0x24], 0
mov dword [esi + 0x28], 0
test byte [eax + 4], 3
je 0x40d4df
push eax
push esi
call fcn.0040dd80
add esp, 8
mov eax, dword [esi + 0x7c]
mov eax, dword [eax + 0x24]
test byte [eax + 4], 3
je 0x40d4f5
push eax
push esi
call fcn.0040dd80
add esp, 8
mov eax, dword [esi + 0xbc]
add eax, 4
cmp eax, 0xfffffff6
jbe 0x40d519
mov eax, dword [esi + 0xb8]
test byte [eax + 4], 3
je 0x40d519
push eax
push esi
call fcn.0040dd80
add esp, 8
push esi
call fcn.0040de80
add esp, 4
mov byte [esi + 0x11], 1
jmp case.default.0x40d4b0
cmp dword [esi + 0x20], 0
je 0x40d53f
push esi
call fcn.0040f3f0
add esp, 4
jmp 0x40d672
mov byte [esi + 0x11], 2
jmp case.default.0x40d4b0
cmp dword [esi + 0xf8], 0
je 0x40d55b
mov eax, 0x7fffff00
jmp 0x40d672
push ecx
push esi
call fcn.0040d850
add esp, 8
mov byte [esi + 0x11], 3
mov dword [esi + 0x14], 0
jmp case.default.0x40d4b0
mov ecx, dword [esi + 0x14]
mov edi, dword [esi + 8]
lea eax, [ecx + 1]
mov dword [esi + 0x14], eax
mov eax, dword [esi + 0x58]
lea eax, [eax + ecx*4]
push eax
push esi
call fcn.0040e700
mov eax, dword [esi + 0x14]
add esp, 8
cmp eax, dword [esi + 0x5c]
jbe 0x40d59d
mov byte [esi + 0x11], 4
mov eax, dword [esi + 8]
sub eax, edi
add dword [esi + 0x34], eax
mov eax, 0xa
jmp 0x40d672
mov edi, dword [esi + 8]
push 0x28
push dword [esi + 0x1c]
push esi
call fcn.0040e660
mov ecx, dword [esi + 8]
add esp, 0xc
sub ecx, edi
mov dword [esi + 0x1c], eax
add dword [esi + 0x34], ecx
cmp dword [eax], 0
jne 0x40d612
mov ecx, dword [esi + 0x5c]
mov eax, ecx
shr eax, 2
cmp dword [esi + 0x60], eax
ja 0x40d5f4
cmp ecx, 0x1ff
jbe 0x40d5f4
shr ecx, 1
push ecx
push dword [esp + 0x18]
call fcn.0040fde0
add esp, 8
cmp dword [esi + 0x2c], 0
je 0x40d607
mov word [esi + 0x11], 0x105
mov eax, 0x190
jmp 0x40d672
mov byte [esi + 0x11], 0
mov dword [esi + 0x30], 0
mov eax, 0x190
jmp 0x40d672
cmp dword [esi + 0x2c], 0
je 0x40d64d
cmp dword [esi + 0xf8], 0
je 0x40d62f
mov eax, 0x7fffff00
jmp 0x40d672
push ecx
call fcn.0040dc90
mov eax, dword [esi + 0x34]
add esp, 4
cmp eax, 0x64
jbe 0x40d646
add eax, 0xffffff9c
mov dword [esi + 0x34], eax
mov eax, 0x64
jmp 0x40d672
cmp byte [esi + 0x12], 0
jne 0x40d665
mov eax, dword [esi + 0xfc]
push dword [eax + 0x14]
push ecx
call fcn.00410de0
add esp, 8
mov byte [esi + 0x11], 0
mov dword [esi + 0x30], 0
xor eax, eax
sub ebp, eax
cmp byte [ebx + 0x11], 0
je 0x40d6ca
mov ecx, dword [esp + 0x14]
test ebp, ebp
jg 0x40d4a0
mov eax, dword [ebx + 0x30]
mov ecx, dword [ebx + 8]
cmp eax, 0x400
jae 0x40d6ae
pop edi
lea eax, [ecx + 0x400]
mov dword [ebx + 0xc], eax
mov eax, dword [esp + 0xc]
pop esi
mov dword [ebx + 0x78], eax
or eax, 0xffffffff
pop ebp
pop ebx
add esp, 8
ret
pop edi
add eax, 0xfffffc00
mov dword [ebx + 0xc], ecx
mov dword [ebx + 0x30], eax
mov eax, dword [esp + 0xc]
pop esi
mov dword [ebx + 0x78], eax
xor eax, eax
pop ebp
pop ebx
add esp, 8
ret
mov eax, 0x51eb851f
mul dword [ebx + 0x34]
mov eax, dword [esp + 0x10]
shr edx, 5
imul edx, dword [ebx + 0x3c]
pop edi
pop esi
pop ebp
mov dword [ebx + 0xc], edx
mov dword [ebx + 0x78], eax
mov eax, 1
pop ebx
add esp, 8
ret