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

Disassembly:
sub esp, 0x4c
mov eax, dword [0x462080]
xor eax, esp
mov dword [esp + 0x48], eax
push ebx
mov ebx, dword [esp + 0x58]
lea eax, [esp + 0x24]
push ebp
push esi
mov esi, dword [esp + 0x5c]
push edi
push 5
push eax
push ebx
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x3c], 0xffffffff
mov dword [esp + 0x40], 0xffffffff
mov dword [esp + 0x44], 0xffffffff
mov dword [esp + 0x48], 0xffffffff
mov dword [esp + 0x4c], 0xffffffff
call fcn.0040ccd0
mov edx, eax
add esp, 0xc
mov dword [esp + 0x20], edx
xor edi, edi
mov ecx, edi
mov ebx, 1
shl ebx, cl
lea ecx, [edi + 0x10]
mov eax, ebx
bts eax, ecx
test edx, eax
je 0x40e46a
mov ebp, dword [esp + edi*4 + 0x30]
lea edx, [esi + 0x60]
mov dword [esp + 0x28], ebp
mov dword [esp + 0x24], edx
cmp ebp, 0xffffffff
je 0x40e2ea
push 4
lea eax, [esp + 0x2c]
push eax
push edx
call fcn.00421b20
mov edx, dword [esp + 0x30]
lea ecx, [edi + 0x10]
add esp, 0xc
mov esi, eax
jmp 0x40e2ec
xor esi, esi
and ebx, dword [esp + 0x20]
mov eax, 1
neg ebx
sbb ebx, ebx
shl eax, cl
neg ebx
mov ecx, ebx
or ecx, 2
and eax, dword [esp + 0x20]
cmove ecx, ebx
mov dword [esp + 0x18], ecx
mov dword [esp + edi*4 + 0x44], ecx
test esi, esi
je 0x40e378
mov ecx, dword [esp + 0x10]
xor edi, edi
mov edx, dword [ecx + 0x78]
test edx, edx
jle 0x40e3d6
lea eax, [ecx + 0x50]
nop dword [eax]
cmp ebp, dword [eax]
je 0x40e341
inc edi
add eax, 4
cmp edi, edx
jl 0x40e330
jmp 0x40e3d6
mov edx, dword [ecx + edi*4 + 0x64]
mov eax, dword [esp + 0x18]
cmp edx, eax
je 0x40e400
test dl, 1
je 0x40e359
dec dword [esi + 0x1c]
test dl, 2
je 0x40e361
dec dword [esi + 0x20]
test al, 1
je 0x40e368
inc dword [esi + 0x1c]
test al, 2
je 0x40e400
inc dword [esi + 0x20]
jmp 0x40e400
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x2c], ebp
cmp ebp, 0xffffffff
je 0x40e39b
push 4
lea eax, [esp + 0x30]
push eax
push edx
call fcn.00421b20
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x40e3d2
push 0x24
push 1
call dword [0x462010]
mov esi, eax
add esp, 8
test esi, esi
je 0x40e452
push 0
push esi
call fcn.00421600
push esi
push 4
lea eax, [esp + 0x2c]
push eax
push dword [esp + 0x38]
call fcn.004217d0
add esp, 0x18
test eax, eax
je 0x40e448
mov ecx, dword [esp + 0x10]
inc dword [esi + 0x18]
mov eax, dword [esp + 0x18]
test al, 1
je 0x40e3e4
inc dword [esi + 0x1c]
test al, 2
je 0x40e3eb
inc dword [esi + 0x20]
lea eax, [ecx + 0x24]
push eax
push ecx
push dword [esi + 4]
push esi
call fcn.00421620
mov ecx, dword [esp + 0x20]
add esp, 0x10
mov ebx, dword [esi + 0x20]
neg ebx
sbb ebx, ebx
xor eax, eax
and ebx, 2
cmp dword [esi + 0x1c], eax
setne al
or ebx, eax
cmp dword [esi + 0x10], ebx
je 0x40e435
mov edx, dword [esp + 0x14]
mov eax, dword [edx + 0x34]
test eax, eax
je 0x40e432
push dword [esi + 0x14]
push dword [edx + 0x38]
push ebx
push ebp
push ecx
call eax
add esp, 0x14
mov dword [esi + 0x10], ebx
inc edi
cmp edi, 5
jge 0x40e46a
mov esi, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
jmp 0x40e2a2
push esi
call dword [0x462004]
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 3
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.004501c9
add esp, 0x4c
ret
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x18], 0
cmp dword [ebx + 0x78], 0
jle 0x40e53d
lea ebp, [ebx + 0x64]
mov esi, dword [ebp - 0x14]
xor eax, eax
test edi, edi
jle 0x40e49f
nop dword [eax]
cmp esi, dword [esp + eax*4 + 0x30]
je 0x40e528
inc eax
cmp eax, edi
jl 0x40e490
mov dword [esp + 0x1c], esi
cmp esi, 0xffffffff
je 0x40e528
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x1c]
push 4
add eax, 0x60
push ecx
push eax
call fcn.00421b20
mov edx, eax
add esp, 0xc
test edx, edx
je 0x40e528
mov ecx, dword [edx + 0x18]
mov eax, dword [ebp]
dec ecx
mov dword [edx + 0x18], ecx
test al, 2
je 0x40e4da
dec dword [edx + 0x20]
test al, 1
je 0x40e4e1
dec dword [edx + 0x1c]
test ecx, ecx
jne 0x40e519
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx + 0x34]
test eax, eax
je 0x40e503
push dword [edx + 0x14]
push dword [ecx + 0x38]
push 4
push esi
push ebx
call eax
mov ecx, dword [esp + 0x28]
add esp, 0x14
push 4
lea eax, [esp + 0x20]
mov dword [esp + 0x20], esi
push eax
lea eax, [ecx + 0x60]
push eax
call fcn.00421960
jmp 0x40e525
push 0
lea eax, [ebx + 0x24]
push eax
push edx
call fcn.00421750
add esp, 0xc
mov eax, dword [esp + 0x18]
add ebp, 4
inc eax
mov dword [esp + 0x18], eax
cmp eax, dword [ebx + 0x78]
jl 0x40e483
lea esi, [edi*4]
push esi
lea eax, [esp + 0x34]
push eax
lea eax, [ebx + 0x50]
push eax
call sub.VCRUNTIME140.dll_memcpy
push esi
lea eax, [esp + 0x54]
push eax
lea eax, [ebx + 0x64]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [esp + 0x70]
add esp, 0x18
mov dword [ebx + 0x78], edi
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004501c9
add esp, 0x4c
ret