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

Disassembly:
sub esp, 0x6c
lea eax, [esp + 0x1c]
push ebx
push ebp
push esi
mov esi, ecx
push edi
push eax
mov ecx, dword [esi + 0x20]
push ecx
call dword [0x4dabf0]
mov ecx, esi
call fcn.004cd020
test ah, 4
je 0x40c910
mov ecx, esi
call fcn.004cd020
test ah, 8
jne 0x40c91c
mov ecx, esi
call fcn.004cd020
test ah, 8
je 0x40c941
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x2c]
mov ebx, dword [esp + 0x30]
sub edx, eax
mov eax, dword [esp + 0x38]
push edx
sub eax, ebx
lea ecx, [esp + 0x30]
push eax
push 0
push 0
push ecx
call dword [0x4dabec]
mov ecx, esi
call fcn.004cd020
mov edx, dword [esi + 0x20]
and eax, 0x400
xor edi, edi
push edx
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], edi
mov dword [esp + 0x14], edi
call dword [0x4dabe8]
push eax
call fcn.004cce3a
mov ebp, eax
lea ecx, [esi + 0x50]
push ecx
mov ecx, ebp
mov eax, dword [ebp]
mov dword [esp + 0x24], ebp
call dword [eax + 0x30]
mov ecx, esi
mov dword [esp + 0x28], eax
call fcn.004cd020
test al, 1
je 0x40cb61
mov ecx, dword [esi + 0x16c]
xor eax, eax
cmp ecx, edi
mov dword [esp + 0x18], eax
jle 0x40c9f7
mov edx, dword [esi + 0x168]
lea ebx, [esp + 0x3c]
push 0x400
push ebx
mov eax, dword [edx + eax*4]
mov edx, dword [ebp]
mov dword [esp + 0x2c], 0
mov eax, dword [eax]
mov ecx, dword [eax - 8]
push ecx
push eax
mov ecx, ebp
call dword [edx + 0x70]
test eax, eax
jle 0x40c9da
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x3c]
sub eax, ecx
jmp 0x40c9de
mov eax, dword [esp + 0x24]
cmp eax, edi
jle 0x40c9e4
mov edi, eax
mov eax, dword [esp + 0x18]
mov ecx, dword [esi + 0x16c]
inc eax
cmp eax, ecx
mov dword [esp + 0x18], eax
jl 0x40c9a0
mov eax, dword [esi + 0x16c]
xor ebx, ebx
test eax, eax
jle 0x40ccef
mov ebp, dword [esp + 0x30]
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40ca75
mov eax, ecx
mov ecx, dword [esi + 0x168]
xor edx, edx
sub eax, ebp
mov ecx, dword [ecx + ebx*4]
add ecx, 8
lea ebp, [eax + edi + 4]
add eax, 0xfffffffe
mov dword [ecx], edx
mov edx, ecx
xor ecx, ecx
mov dword [edx + 4], ecx
mov dword [edx + 8], ebp
mov dword [edx + 0xc], eax
mov ecx, dword [esp + 0x38]
sub ecx, dword [esp + 0x30]
mov eax, ecx
add ecx, 0xfffffffe
cdq
mov dword [esp + 0x58], ecx
mov ecx, dword [esi + 0x168]
sub eax, edx
xor edx, edx
mov ecx, dword [ecx + ebx*4]
sar eax, 1
add ecx, 0x18
lea ebp, [eax + edi + 4]
mov dword [ecx], eax
mov dword [ecx + 4], edx
mov edx, dword [esp + 0x58]
mov dword [ecx + 8], ebp
jmp 0x40cad3
mov eax, ecx
mov ecx, dword [esi + 0x168]
xor edx, edx
sub eax, ebp
mov ecx, dword [ecx + ebx*4]
add ecx, 8
lea ebp, [eax + edi + 4]
dec eax
mov dword [ecx], edx
mov edx, ecx
mov ecx, 1
mov dword [edx + 4], ecx
mov dword [edx + 8], ebp
mov dword [edx + 0xc], eax
mov ecx, dword [esp + 0x38]
sub ecx, dword [esp + 0x30]
mov eax, ecx
cdq
sub eax, edx
mov edx, 1
sar eax, 1
dec ecx
mov dword [esp + 0x68], ecx
mov ecx, dword [esi + 0x168]
lea ebp, [eax + edi + 4]
mov ecx, dword [ecx + ebx*4]
add ecx, 0x18
mov dword [ecx], eax
mov dword [ecx + 4], edx
mov edx, dword [esp + 0x68]
mov dword [ecx + 8], ebp
mov ebp, dword [esp + 0x10]
mov dword [ecx + 0xc], edx
mov eax, dword [esi + 0x168]
push 0
push ebp
mov ecx, dword [eax + ebx*4]
add ecx, 8
push ecx
call dword [0x4dabac]
mov edx, dword [esi + 0x168]
push 0
push ebp
mov eax, dword [edx + ebx*4]
add eax, 0x18
push eax
call dword [0x4dabac]
mov ecx, dword [esi + 0x168]
mov ebp, dword [esp + 0x30]
mov edx, dword [ecx + ebx*4]
mov ecx, dword [esp + 0x38]
mov eax, ecx
mov dword [esp + 0x14], edx
sub eax, ebp
cdq
sub eax, edx
mov edx, dword [esp + 0x14]
sar eax, 1
mov edx, dword [edx + 0x10]
sub edx, eax
mov eax, dword [esp + 0x14]
sub edx, dword [eax + 8]
mov eax, dword [esp + 0x10]
add eax, edx
mov edx, dword [esp + 0x14]
mov dword [esp + 0x10], eax
inc ebx
mov eax, dword [edx + 0x10]
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0x16c]
cmp ebx, eax
jl 0x40ca0f
mov ebp, dword [esp + 0x20]
jmp 0x40ccef
cmp dword [esi + 0x16c], edi
jle 0x40ccef
mov ecx, dword [esi + 0x168]
mov edx, dword [ebp]
push 0x400
xor ebx, ebx
mov eax, dword [ecx + edi*4]
lea ecx, [esp + 0x40]
push ecx
mov eax, dword [eax]
mov ecx, dword [eax - 8]
push ecx
push eax
mov ecx, ebp
call dword [edx + 0x70]
test eax, eax
jle 0x40cb9f
mov ebx, dword [esp + 0x44]
mov eax, dword [esp + 0x3c]
sub ebx, eax
mov eax, dword [esp + 0x1c]
xor ecx, ecx
cmp eax, ecx
je 0x40cc16
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x30]
sub eax, edx
mov dword [esp + 0x50], ecx
lea edx, [eax + ebx + 4]
add eax, 0xfffffffe
mov dword [esp + 0x58], eax
mov eax, dword [esi + 0x168]
mov eax, dword [eax + edi*4]
add eax, 8
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [eax + 8], edx
mov edx, dword [esp + 0x58]
mov dword [eax + 0xc], edx
mov ecx, dword [esp + 0x38]
sub ecx, dword [esp + 0x30]
mov eax, ecx
add ecx, 0xfffffffe
cdq
mov dword [esp + 0x68], ecx
mov ecx, dword [esi + 0x168]
sub eax, edx
xor edx, edx
mov ecx, dword [ecx + edi*4]
sar eax, 1
add ecx, 0x18
lea ebx, [eax + ebx + 4]
mov dword [ecx], eax
mov dword [ecx + 4], edx
mov edx, dword [esp + 0x68]
mov dword [ecx + 8], ebx
mov dword [ecx + 0xc], edx
jmp 0x40cc81
mov eax, dword [esp + 0x38]
mov ebp, dword [esp + 0x30]
sub eax, ebp
mov edx, 1
lea ebp, [eax + ebx + 4]
dec eax
mov dword [esp + 0x78], eax
mov eax, dword [esi + 0x168]
mov eax, dword [eax + edi*4]
add eax, 8
mov dword [eax], ecx
mov ecx, dword [esp + 0x78]
mov dword [eax + 4], edx
mov dword [eax + 8], ebp
mov dword [eax + 0xc], ecx
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x30]
mov ebp, dword [esi + 0x168]
sub ecx, eax
mov ebp, dword [ebp + edi*4]
mov eax, ecx
cdq
sub eax, edx
mov edx, 1
sar eax, 1
dec ecx
add ebp, 0x18
lea ebx, [eax + ebx + 4]
mov dword [ebp], eax
mov dword [ebp + 4], edx
mov dword [ebp + 8], ebx
mov dword [ebp + 0xc], ecx
mov ebp, dword [esp + 0x20]
mov edx, dword [esi + 0x168]
mov ebx, dword [esp + 0x10]
push 0
push ebx
mov eax, dword [edx + edi*4]
add eax, 8
push eax
call dword [0x4dabac]
mov ecx, dword [esi + 0x168]
push 0
push ebx
mov edx, dword [ecx + edi*4]
add edx, 0x18
push edx
call dword [0x4dabac]
mov eax, dword [esi + 0x168]
mov edx, dword [esp + 0x30]
mov ecx, dword [eax + edi*4]
mov eax, dword [esp + 0x38]
sub eax, edx
cdq
sub eax, edx
mov edx, dword [ecx + 0x10]
sar eax, 1
sub edx, eax
mov eax, dword [ecx + 8]
sub edx, eax
mov eax, dword [ecx + 0x10]
add ebx, edx
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0x16c]
inc edi
cmp edi, eax
mov dword [esp + 0x10], ebx
jl 0x40cb6d
mov eax, dword [esp + 0x28]
mov edx, dword [ebp]
push eax
mov ecx, ebp
call dword [edx + 0x30]
mov ecx, dword [ebp + 4]
mov edx, dword [esi + 0x20]
push ecx
push edx
call dword [0x4dabf4]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6c
ret