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

Disassembly:
sub esp, 8
mov edx, ecx
push ebx
push ebp
push esi
mov ebx, dword [edx + 8]
push edi
mov dword [esp + 0x14], edx
mov eax, dword [ebx + 0x4c]
mov ecx, dword [ebx + 0x18]
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 0x44]
mov dword [ebx + 0x4c], 0xfffffffd
lea ebp, [eax + eax*4]
mov eax, 0x7fffff00
add ebp, ebp
cmove ebp, eax
mov eax, dword [ebx + 0x14]
cmp eax, ecx
jbe 0x40e330
sub eax, ecx
add dword [ebx + 0x3c], eax
nop dword [eax]
mov edi, dword [edx + 8]
movzx eax, byte [edi + 0x1d]
cmp eax, 5
ja case.default.0x40e340
jmp dword [eax*4 + 0x40e57c]
mov eax, dword [edi + 0x74]
mov dword [edi + 0x2c], 0
mov dword [edi + 0x30], 0
mov dword [edi + 0x34], 0
test byte [eax + 4], 3
je 0x40e372
push eax
push edi
call fcn.0040eac0
mov eax, dword [edi + 0x74]
add esp, 8
mov eax, dword [eax + 0x24]
test byte [eax + 4], 3
je 0x40e385
push eax
push edi
call fcn.0040eac0
add esp, 8
mov eax, dword [edi + 0x7c]
add eax, 4
cmp eax, 0xfffffff6
jbe 0x40e3a3
mov eax, dword [edi + 0x78]
test byte [eax + 4], 3
je 0x40e3a3
push eax
push edi
call fcn.0040eac0
add esp, 8
push edi
call fcn.0040eb60
add esp, 4
mov byte [edi + 0x1d], 1
jmp case.default.0x40e340
cmp dword [edi + 0x2c], 0
je 0x40e3c9
push edi
call fcn.0040fbe0
add esp, 4
jmp 0x40e4fd
mov byte [edi + 0x1d], 2
jmp case.default.0x40e340
cmp dword [edi + 0xe0], 0
je 0x40e3e5
mov eax, 0x7fffff00
jmp 0x40e4fd
push edx
push edi
call fcn.0040e6e0
add esp, 8
mov byte [edi + 0x1d], 3
mov dword [edi + 0x20], 0
jmp case.default.0x40e340
mov ecx, dword [edi + 0x20]
mov esi, dword [edi + 0x14]
push 0xffffffffffffffff
lea eax, [ecx + 1]
mov dword [edi + 0x20], eax
mov eax, dword [edi]
lea eax, [eax + ecx*4]
push eax
push edi
call fcn.0040f080
mov eax, dword [edi + 0x20]
add esp, 0xc
cmp eax, dword [edi + 4]
jbe 0x40e428
mov byte [edi + 0x1d], 4
mov eax, dword [edi + 0x14]
sub eax, esi
add dword [edi + 0x40], eax
mov eax, 0xa
jmp 0x40e4fd
mov esi, dword [edi + 0x14]
push 0x28
push dword [edi + 0x28]
push edi
call fcn.0040f080
mov ecx, dword [edi + 0x14]
add esp, 0xc
sub ecx, esi
mov dword [edi + 0x28], eax
add dword [edi + 0x40], ecx
cmp dword [eax], 0
jne 0x40e49d
mov ecx, dword [edi + 4]
mov eax, ecx
shr eax, 2
cmp dword [edi + 8], eax
ja 0x40e47f
cmp ecx, 0x1ff
jbe 0x40e47f
shr ecx, 1
push ecx
push dword [esp + 0x18]
call fcn.004102e0
add esp, 8
cmp dword [edi + 0x38], 0
je 0x40e492
mov word [edi + 0x1d], 0x105
mov eax, 0x190
jmp 0x40e4fd
mov byte [edi + 0x1d], 0
mov dword [edi + 0x3c], 0
mov eax, 0x190
jmp 0x40e4fd
cmp dword [edi + 0x38], 0
je 0x40e4d8
cmp dword [edi + 0xe0], 0
je 0x40e4ba
mov eax, 0x7fffff00
jmp 0x40e4fd
push edx
call fcn.0040e9d0
mov eax, dword [edi + 0x40]
add esp, 4
cmp eax, 0x64
jbe 0x40e4d1
add eax, 0xffffff9c
mov dword [edi + 0x40], eax
mov eax, 0x64
jmp 0x40e4fd
cmp byte [edi + 0x1e], 0
jne 0x40e4f0
mov eax, dword [edi + 0xe4]
push dword [eax + 0x14]
push edx
call fcn.00410c30
add esp, 8
mov byte [edi + 0x1d], 0
mov dword [edi + 0x3c], 0
xor eax, eax
sub ebp, eax
cmp byte [ebx + 0x1d], 0
je 0x40e555
mov edx, dword [esp + 0x14]
test ebp, ebp
jg 0x40e330
mov eax, dword [ebx + 0x3c]
mov ecx, dword [ebx + 0x14]
cmp eax, 0x400
jae 0x40e539
pop edi
lea eax, [ecx + 0x400]
mov dword [ebx + 0x18], eax
mov eax, dword [esp + 0xc]
pop esi
mov dword [ebx + 0x4c], eax
or eax, 0xffffffff
pop ebp
pop ebx
add esp, 8
ret
pop edi
add eax, 0xfffffc00
mov dword [ebx + 0x18], ecx
mov dword [ebx + 0x3c], eax
mov eax, dword [esp + 0xc]
pop esi
mov dword [ebx + 0x4c], eax
xor eax, eax
pop ebp
pop ebx
add esp, 8
ret
mov eax, 0x51eb851f
mul dword [ebx + 0x40]
mov eax, dword [esp + 0x10]
shr edx, 5
imul edx, dword [ebx + 0x48]
pop edi
pop esi
pop ebp
mov dword [ebx + 0x18], edx
mov dword [ebx + 0x4c], eax
mov eax, 1
pop ebx
add esp, 8
ret