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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x1c], edx
push edi
mov dword [ebp - 0x18], 0
test dword [esi + 8], 0x80000
je 0x40c840
mov eax, dword [esi + 0x1c]
sub eax, dword [esi + 0x40]
mov dword [ebp - 0x14], 1
cmp eax, dword [esi + 0x24]
jbe 0x40c847
mov dword [ebp - 0x14], 0
cmp dword [esi], 0
jne 0x40c867
mov eax, dword [esi + 0x7c]
mov ecx, dword [esi + 0x8c]
mov eax, dword [eax]
sub eax, ecx
cmp eax, 0x14ccc
jb 0x40c867
mov eax, dword [esi + 0x74]
add eax, ecx
jmp 0x40c86d
lea eax, [esi + 0x39272]
mov cl, byte [esi + 0x38]
lea edx, [esi + 0x34]
mov dword [esi + 0x30], eax
lea edi, [esi + 0x30]
mov dword [ebp - 0x20], eax
add eax, 0x14cbc
mov dword [edx], eax
mov eax, dword [esi + 0x2c]
mov dword [esi + 0x58], 0
mov dword [esi + 0x5c], 0
mov dword [ebp - 8], edx
shr byte [eax], cl
xor eax, eax
cmp dword [esi + 0x38], 8
mov ecx, dword [esi + 8]
sete al
sub dword [esi + 0x28], eax
test ecx, 0x1000
je 0x40c9ab
cmp dword [esi + 0x64], 0
lea edx, [esi + 0x34]
mov dword [ebp - 8], edx
lea edi, [esi + 0x30]
jne 0x40c9ab
xor eax, eax
and ecx, 0xfff
nop
cmp dword [eax*4 + 0x411330], ecx
je 0x40c8df
inc eax
cmp eax, 0xb
jb 0x40c8d0
cmp eax, 2
jae 0x40c8e8
xor ecx, ecx
jmp 0x40c901
cmp eax, 6
jae 0x40c8f4
mov ecx, 1
jmp 0x40c901
mov ecx, 3
mov edx, 2
cmove ecx, edx
or ecx, 0x1e0
mov eax, 0x8421085
shl ecx, 6
mul ecx
sub ecx, edx
shr ecx, 1
add ecx, edx
mov edx, 0x78
shr ecx, 4
inc cl
mov al, cl
shl al, 5
sub al, cl
mov ecx, dword [esi + 0x44]
shl edx, cl
or edx, dword [esi + 0x48]
mov byte [ebp - 1], al
lea edi, [ecx + 8]
mov dword [esi + 0x48], edx
mov dword [esi + 0x44], edi
cmp edi, 8
jb 0x40c968
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x40c94e
mov byte [eax], dl
inc dword [esi + 0x30]
mov edi, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
add edi, 0xfffffff8
shr edx, 8
mov dword [esi + 0x48], edx
mov dword [esi + 0x44], edi
cmp edi, 8
jae 0x40c941
mov al, byte [ebp - 1]
movzx eax, al
mov ecx, edi
shl eax, cl
mov ecx, eax
mov dword [ebp - 0x10], eax
lea eax, [edi + 8]
or ecx, edx
mov dword [esi + 0x48], ecx
mov dword [esi + 0x44], eax
cmp eax, 8
jb 0x40c9a2
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x40c991
mov byte [eax], cl
inc dword [esi + 0x30]
shr dword [esi + 0x48], 8
add dword [esi + 0x44], 0xfffffff8
cmp dword [esi + 0x44], 8
mov cl, byte [esi + 0x48]
jae 0x40c984
lea edx, [esi + 0x34]
mov dword [ebp - 8], edx
lea edi, [esi + 0x30]
mov ecx, dword [esi + 0x44]
xor ebx, ebx
cmp dword [ebp - 0x1c], 4
sete bl
shl ebx, cl
lea eax, [ecx + 1]
or ebx, dword [esi + 0x48]
mov dword [esi + 0x48], ebx
mov dword [ebp - 0x10], eax
mov dword [esi + 0x44], eax
cmp eax, 8
jb 0x40ca03
jmp 0x40c9d3
mov ebx, dword [ebp - 0xc]
mov eax, dword [edi]
cmp eax, dword [edx]
jae 0x40c9dd
mov byte [eax], bl
inc dword [edi]
mov eax, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
add eax, 0xfffffff8
shr ebx, 8
mov dword [esi + 0x48], ebx
mov dword [ebp - 0x10], eax
mov dword [esi + 0x44], eax
mov byte [ebp - 0xc], bl
cmp eax, 8
jae 0x40c9d0
lea ecx, [esi + 0x34]
lea edi, [esi + 0x30]
mov dword [ebp - 8], ecx
cmp dword [ebp - 0x14], 0
mov eax, dword [edi]
mov dword [ebp - 0xc], eax
jne 0x40ca5e
test dword [esi + 8], 0x40000
lea eax, [esi + 0x3c]
jne 0x40ca26
cmp dword [eax], 0x30
mov dword [ebp - 0x14], eax
jb 0x40ca26
xor edx, edx
jmp 0x40ca2e
mov edx, 1
mov dword [ebp - 0x14], eax
mov ecx, esi
call fcn.0040c720
mov edx, dword [ebp - 0x14]
mov ecx, dword [edi]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0xc]
mov edx, dword [edx]
test edx, edx
je 0x40cbb2
sub ecx, eax
inc ecx
cmp ecx, edx
jb 0x40cbb2
lea eax, [esi + 0x34]
lea edi, [esi + 0x30]
mov dword [ebp - 8], eax
mov eax, dword [esi + 0x1c]
sub eax, dword [esi + 0x40]
cmp eax, dword [esi + 0x24]
mov eax, dword [ebp - 0xc]
ja 0x40cbb2
mov ecx, dword [ebp - 0x10]
add ecx, 2
mov dword [edi], eax
mov dword [esi + 0x48], ebx
mov dword [esi + 0x44], ecx
cmp ecx, 8
jb 0x40cabc
mov ecx, dword [ebp - 0xc]
mov edx, eax
mov eax, dword [ebp - 8]
cmp ecx, dword [eax]
jae 0x40ca95
mov byte [ecx], bl
inc dword [edi]
mov edx, dword [edi]
mov ecx, dword [esi + 0x44]
mov eax, edx
mov ebx, dword [esi + 0x48]
add ecx, 0xfffffff8
shr ebx, 8
mov dword [esi + 0x48], ebx
mov dword [esi + 0x44], ecx
mov dword [ebp - 0xc], edx
cmp ecx, 8
jae 0x40ca83
lea eax, [esi + 0x34]
mov dword [ebp - 8], eax
lea edi, [esi + 0x30]
jmp 0x40cac1
mov edx, eax
mov eax, dword [ebp - 8]
test ecx, ecx
je 0x40cafc
mov dword [esi + 0x48], ebx
mov dword [esi + 0x44], 8
nop
cmp edx, dword [eax]
jae 0x40cada
mov byte [edx], bl
inc dword [edi]
mov edx, dword [edi]
mov ecx, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
add ecx, 0xfffffff8
mov eax, dword [ebp - 8]
shr ebx, 8
mov dword [esi + 0x48], ebx
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x40cad0
lea edx, [esi + 0x34]
lea edi, [esi + 0x30]
jmp 0x40caff
mov edx, dword [ebp - 8]
mov dword [ebp - 0x14], 2
movzx eax, word [esi + 0x3c]
shl eax, cl
add ecx, 0x10
or eax, ebx
mov dword [esi + 0x44], ecx
mov dword [esi + 0x48], eax
mov ebx, eax
cmp ecx, 8
jb 0x40cb41
nop
mov eax, dword [edi]
cmp eax, dword [edx]
jae 0x40cb2a
mov byte [eax], bl
inc dword [edi]
mov ecx, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
add ecx, 0xfffffff8
shr ebx, 8
mov dword [esi + 0x48], ebx
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x40cb20
mov eax, dword [ebp - 0x14]
xor dword [esi + 0x3c], 0xffff
dec eax
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x40cb06
xor edx, edx
cmp dword [esi + 0x3c], edx
jbe 0x40cbd0
nop word [eax + eax]
mov eax, dword [esi + 0x40]
add eax, edx
and eax, 0x7fff
movzx eax, byte [eax + esi + 0x90]
shl eax, cl
add ecx, 8
or eax, ebx
mov dword [esi + 0x44], ecx
mov dword [esi + 0x48], eax
mov ebx, eax
cmp ecx, 8
jb 0x40cbaa
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x40cb93
mov byte [eax], bl
inc dword [esi + 0x30]
mov ecx, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
add ecx, 0xfffffff8
shr ebx, 8
mov dword [esi + 0x48], ebx
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x40cb86
inc edx
cmp edx, dword [esi + 0x3c]
jb 0x40cb60
jmp 0x40cbd0
cmp dword [ebp - 0x18], 0
jne 0x40cbd0
mov ecx, dword [ebp - 0x10]
mov edx, 1
mov dword [esi + 0x44], ecx
mov ecx, esi
mov dword [esi + 0x30], eax
mov dword [esi + 0x48], ebx
call fcn.0040c720
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x40cd36
mov ecx, dword [esi + 0x44]
cmp eax, 4
jne 0x40cc77
test ecx, ecx
je 0x40cc1a
mov edx, dword [esi + 0x48]
mov dword [esi + 0x48], edx
mov dword [esi + 0x44], 8
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x40cc05
mov byte [eax], dl
inc dword [esi + 0x30]
mov ecx, dword [esi + 0x44]
shr dword [esi + 0x48], 8
add ecx, 0xfffffff8
mov dl, byte [esi + 0x48]
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x40cbf8
test dword [esi + 8], 0x1000
je 0x40cd36
mov edx, dword [esi + 0x18]
mov edi, 4
nop
mov eax, edx
shr eax, 0x18
shl eax, cl
add ecx, 8
or eax, dword [esi + 0x48]
mov dword [esi + 0x48], eax
mov dword [esi + 0x44], ecx
cmp ecx, 8
jb 0x40cc6a
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x40cc55
mov byte [ecx], al
inc dword [esi + 0x30]
mov ecx, dword [esi + 0x44]
shr dword [esi + 0x48], 8
add ecx, 0xfffffff8
mov al, byte [esi + 0x48]
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x40cc48
shl edx, 8
sub edi, 1
jne 0x40cc30
jmp 0x40cd36
mov edx, dword [esi + 0x48]
add ecx, 3
xor ebx, ebx
mov dword [esi + 0x48], edx
mov dword [esi + 0x44], ecx
cmp ecx, 8
jb 0x40ccb4
nop word [eax + eax]
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x40cc9d
mov byte [eax], dl
inc dword [esi + 0x30]
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
add ecx, 0xfffffff8
shr edx, 8
mov dword [esi + 0x48], edx
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x40cc90
test ecx, ecx
je 0x40cce6
mov dword [esi + 0x48], edx
mov dword [esi + 0x44], 8
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x40cccf
mov byte [eax], dl
inc dword [esi + 0x30]
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
add ecx, 0xfffffff8
shr edx, 8
mov dword [esi + 0x48], edx
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x40ccc2
mov edi, 2
nop dword [eax + eax]
movzx eax, bx
shl eax, cl
add ecx, 0x10
or eax, edx
mov dword [esi + 0x44], ecx
mov dword [esi + 0x48], eax
mov edx, eax
cmp ecx, 8
jb 0x40cd2b
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x40cd14
mov byte [eax], dl
inc dword [esi + 0x30]
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
add ecx, 0xfffffff8
shr edx, 8
mov dword [esi + 0x48], edx
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x40cd07
xor ebx, 0xffff
sub edi, 1
jne 0x40ccf0
push 0x240
lea eax, [esi + 0x8192]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push 0x40
lea eax, [esi + 0x83d2]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov edi, dword [esi + 0x30]
lea eax, [esi + 0x9273]
inc dword [esi + 0x64]
add esp, 0x18
mov dword [esi + 0x28], eax
lea eax, [esi + 0x9272]
mov dword [esi + 0x2c], eax
mov eax, dword [esi + 0x3c]
add dword [esi + 0x40], eax
mov eax, dword [ebp - 0x20]
mov dword [esi + 0x38], 8
mov dword [esi + 0x3c], 0
sub edi, eax
je 0x40ce18
cmp dword [esi], 0
je 0x40cdcd
mov eax, dword [esi + 0x78]
mov ecx, dword [esi + 0x84]
sub ecx, dword [esi + 0x70]
mov dword [eax], ecx
lea eax, [esi + 0x39272]
push dword [esi + 4]
push edi
push eax
mov eax, dword [esi]
call eax
add esp, 0xc
test eax, eax
jne 0x40ce18
pop edi
mov dword [esi + 0x6c], 0xffffffff
or eax, 0xffffffff
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [esi + 0x39272]
cmp eax, edx
jne 0x40ce12
mov eax, dword [esi + 0x7c]
mov ecx, dword [esi + 0x8c]
mov ebx, dword [eax]
mov eax, dword [esi + 0x74]
sub ebx, ecx
cmp edi, ebx
cmovb ebx, edi
add eax, ecx
push ebx
push edx
push eax
call sub.VCRUNTIME140.dll_memcpy
add dword [esi + 0x8c], ebx
add esp, 0xc
sub edi, ebx
je 0x40ce18
mov dword [esi + 0x5c], edi
mov eax, edi
pop edi
mov dword [esi + 0x58], ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
add dword [esi + 0x8c], edi
mov eax, dword [esi + 0x5c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret