Function at 0x40cff0
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 0x40d020
mov eax, dword [esi + 0x1c]
sub eax, dword [esi + 0x40]
mov dword [ebp - 0x14], 1
cmp eax, dword [esi + 0x24]
jbe 0x40d027
mov dword [ebp - 0x14], 0
cmp dword [esi], 0
jne 0x40d047
mov eax, dword [esi + 0x7c]
mov ecx, dword [esi + 0x8c]
mov eax, dword [eax]
sub eax, ecx
cmp eax, 0x14ccc
jb 0x40d047
mov eax, dword [esi + 0x74]
add eax, ecx
jmp 0x40d04d
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 0x40d18b
cmp dword [esi + 0x64], 0
lea edx, [esi + 0x34]
mov dword [ebp - 8], edx
lea edi, [esi + 0x30]
jne 0x40d18b
xor eax, eax
and ecx, 0xfff
nop
cmp dword [eax*4 + 0x412340], ecx
je 0x40d0bf
inc eax
cmp eax, 0xb
jb 0x40d0b0
cmp eax, 2
jae 0x40d0c8
xor ecx, ecx
jmp 0x40d0e1
cmp eax, 6
jae 0x40d0d4
mov ecx, 1
jmp 0x40d0e1
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 0x40d148
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x40d12e
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 0x40d121
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 0x40d182
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x40d171
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 0x40d164
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 0x40d1e3
jmp 0x40d1b3
mov ebx, dword [ebp - 0xc]
mov eax, dword [edi]
cmp eax, dword [edx]
jae 0x40d1bd
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 0x40d1b0
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 0x40d23e
test dword [esi + 8], 0x40000
lea eax, [esi + 0x3c]
jne 0x40d206
cmp dword [eax], 0x30
mov dword [ebp - 0x14], eax
jb 0x40d206
xor edx, edx
jmp 0x40d20e
mov edx, 1
mov dword [ebp - 0x14], eax
mov ecx, esi
call fcn.0040cf00
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 0x40d392
sub ecx, eax
inc ecx
cmp ecx, edx
jb 0x40d392
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 0x40d392
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 0x40d29c
mov ecx, dword [ebp - 0xc]
mov edx, eax
mov eax, dword [ebp - 8]
cmp ecx, dword [eax]
jae 0x40d275
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 0x40d263
lea eax, [esi + 0x34]
mov dword [ebp - 8], eax
lea edi, [esi + 0x30]
jmp 0x40d2a1
mov edx, eax
mov eax, dword [ebp - 8]
test ecx, ecx
je 0x40d2dc
mov dword [esi + 0x48], ebx
mov dword [esi + 0x44], 8
nop
cmp edx, dword [eax]
jae 0x40d2ba
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 0x40d2b0
lea edx, [esi + 0x34]
lea edi, [esi + 0x30]
jmp 0x40d2df
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 0x40d321
nop
mov eax, dword [edi]
cmp eax, dword [edx]
jae 0x40d30a
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 0x40d300
mov eax, dword [ebp - 0x14]
xor dword [esi + 0x3c], 0xffff
dec eax
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x40d2e6
xor edx, edx
cmp dword [esi + 0x3c], edx
jbe 0x40d3b0
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 0x40d38a
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x40d373
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 0x40d366
inc edx
cmp edx, dword [esi + 0x3c]
jb 0x40d340
jmp 0x40d3b0
cmp dword [ebp - 0x18], 0
jne 0x40d3b0
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.0040cf00
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x40d516
mov ecx, dword [esi + 0x44]
cmp eax, 4
jne 0x40d457
test ecx, ecx
je 0x40d3fa
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 0x40d3e5
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 0x40d3d8
test dword [esi + 8], 0x1000
je 0x40d516
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 0x40d44a
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x40d435
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 0x40d428
shl edx, 8
sub edi, 1
jne 0x40d410
jmp 0x40d516
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 0x40d494
nop word [eax + eax]
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x40d47d
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 0x40d470
test ecx, ecx
je 0x40d4c6
mov dword [esi + 0x48], edx
mov dword [esi + 0x44], 8
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x40d4af
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 0x40d4a2
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 0x40d50b
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x40d4f4
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 0x40d4e7
xor ebx, 0xffff
sub edi, 1
jne 0x40d4d0
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 0x40d5f8
cmp dword [esi], 0
je 0x40d5ad
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 0x40d5f8
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 0x40d5f2
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 0x40d5f8
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