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

Disassembly:
sub esp, 0x388
push ebx
push ebp
mov ebp, dword [esp + 0x39c]
push esi
mov esi, dword [esp + 0x39c]
cmp esi, 0xffffffff
push edi
jl 0x40ca62
mov edi, dword [esp + 0x39c]
mov ebx, dword [edi]
cmp esi, dword [ebx + 4]
jge 0x40ca62
cmp dword [edi + 4], 0xffffffff
je 0x40c54e
call fcn.0040c380
cmp esi, dword [edi + 0x238]
mov dword [edi + 4], 0xffffffff
jne 0x40c57d
cmp esi, 0xffffffff
je 0x40c582
lea esi, [edi + 8]
mov ecx, 0x8c
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x388
ret 0xc
cmp esi, 0xffffffff
jne 0x40c5d3
mov eax, dword [edi]
mov ecx, dword [eax + 4]
xor eax, eax
mov dword [ebp], ecx
mov word [ebp + 4], ax
mov dword [ebp + 0x20c], eax
mov dword [ebp + 0x210], eax
mov dword [ebp + 0x214], eax
mov dword [ebp + 0x218], eax
mov dword [ebp + 0x21c], eax
mov dword [ebp + 0x220], eax
mov dword [ebp + 0x224], eax
mov dword [ebp + 0x228], eax
mov dword [ebp + 0x22c], eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x388
ret 0xc
mov eax, dword [edi]
cmp esi, dword [eax + 0x10]
jge 0x40c5e8
mov esi, eax
call fcn.0040bd10
mov esi, dword [esp + 0x3a0]
mov edx, dword [edi]
cmp dword [edx + 0x10], esi
jge 0x40c605
nop
mov esi, dword [edi]
call fcn.0040bd50
mov eax, dword [edi]
mov ecx, dword [esp + 0x3a0]
cmp dword [eax + 0x10], ecx
jl 0x40c5f0
mov ecx, dword [edi]
push 0x104
lea edx, [esp + 0x3c]
push 0
push edx
lea eax, [esp + 0x94]
call fcn.0040ba90
mov edi, dword [edi]
add esp, 0xc
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x28]
push edx
call fcn.0040bdb0
add esp, 0xc
test eax, eax
je 0x40c651
mov eax, 0x700
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x388
ret 0xc
mov edi, dword [esp + 0x39c]
mov eax, dword [edi]
mov eax, dword [eax]
cmp byte [eax], 0
je 0x40c67f
cmp byte [eax + 1], 0
je 0x40c6bc
mov ecx, dword [eax + 0xc]
add ecx, dword [esp + 0x18]
mov edx, dword [eax + 4]
push 0
push 0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x40c686
mov ecx, dword [esp + 0x18]
mov dword [eax + 0x1c], ecx
mov esi, dword [esp + 0x24]
push esi
call sub.MFC80U.DLL_Ordinal_762
mov edx, dword [edi]
mov edi, dword [edx]
add esp, 4
push esi
mov ebx, 1
mov edx, eax
mov dword [esp + 0x1c], eax
call fcn.0040b490
add esp, 4
cmp eax, esi
je 0x40c6ce
mov eax, dword [esp + 0x18]
push eax
call sub.MFC80U.DLL_Ordinal_764
add esp, 4
mov eax, 0x800
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x388
ret 0xc
mov ecx, dword [esp + 0x39c]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
push 0x104
lea ecx, [esp + 0x194]
push ecx
push 0xffffffffffffffff
lea edx, [esp + 0x94]
push edx
push 0
push 0xfde9
mov dword [ebp], eax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ebx, dword [sym.imp.MSVCR80.dll_wcsstr]
lea edi, [esp + 0x190]
mov edi, edi
movzx eax, word [edi]
test ax, ax
je 0x40c724
cmp word [edi + 2], 0x3a
jne 0x40c724
add edi, 4
jmp 0x40c710
cmp ax, 0x5c
jne 0x40c72f
add edi, 2
jmp 0x40c710
cmp ax, 0x2f
jne 0x40c73a
add edi, 2
jmp 0x40c710
push 0x5275a4
push edi
call ebx
add esp, 8
test eax, eax
je 0x40c74e
lea edi, [eax + 8]
jmp 0x40c710
push str..._
push edi
call ebx
add esp, 8
test eax, eax
je 0x40c762
lea edi, [eax + 8]
jmp 0x40c710
push 0x5275bc
push edi
call ebx
add esp, 8
test eax, eax
je 0x40c776
lea edi, [eax + 8]
jmp 0x40c710
push str._.._
push edi
call ebx
add esp, 8
test eax, eax
je 0x40c78a
lea edi, [eax + 8]
jmp 0x40c710
push 0x104
lea eax, [ebp + 4]
push edi
push eax
call dword [sym.imp.MSVCR80.dll_wcsncpy]
mov eax, dword [esp + 0x78]
mov edi, dword [esp + 0x44]
mov edx, eax
shr edx, 0x17
mov ecx, eax
shr ecx, 0x1e
not dl
add esp, 0xc
and cl, 1
and dl, 1
shr edi, 8
mov byte [esp + 0x1f], 0
mov byte [esp + 0x16], 0
mov byte [esp + 0x17], 1
je 0x40c7da
cmp edi, 7
je 0x40c7da
cmp edi, 0xb
je 0x40c7da
cmp edi, 0xe
jne 0x40c801
mov ecx, eax
shr ecx, 2
and cl, 1
mov byte [esp + 0x16], cl
mov ebx, eax
mov ecx, eax
mov dl, al
shr ebx, 1
shr ecx, 4
shr eax, 5
and dl, 1
and bl, 1
and cl, 1
and al, 1
jmp 0x40c809
mov bl, byte [esp + 0x1f]
mov al, byte [esp + 0x17]
test cl, cl
mov dword [ebp + 0x20c], 0
je 0x40c821
mov dword [ebp + 0x20c], 0x10
test al, al
je 0x40c82c
or dword [ebp + 0x20c], 0x20
test bl, bl
je 0x40c837
or dword [ebp + 0x20c], 2
test dl, dl
je 0x40c842
or dword [ebp + 0x20c], 1
cmp byte [esp + 0x16], 0
je 0x40c850
or dword [ebp + 0x20c], 4
mov ecx, dword [esp + 0x50]
mov eax, dword [esp + 0x48]
mov edx, dword [esp + 0x54]
mov dword [ebp + 0x228], ecx
mov ecx, eax
shr ecx, 0x10
mov dword [ebp + 0x22c], edx
call fcn.00408cf0
mov dword [esp + 0x28], eax
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x2c]
push ecx
mov dword [esp + 0x34], edx
call dword [sym.imp.KERNEL32.dll_LocalFileTimeToFileTime]
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
xor ebx, ebx
cmp esi, 4
mov dword [ebp + 0x210], eax
mov dword [ebp + 0x214], ecx
mov dword [ebp + 0x218], eax
mov dword [ebp + 0x21c], ecx
mov dword [ebp + 0x220], eax
mov dword [ebp + 0x224], ecx
jbe 0x40ca1b
mov byte [esp + 0x22], bl
mov eax, dword [esp + 0x18]
mov dl, byte [ebx + eax]
mov al, byte [eax + ebx + 1]
mov byte [esp + 0x20], dl
mov edi, 0x5275d4
lea esi, [esp + 0x20]
mov ecx, 3
xor edx, edx
mov byte [esp + 0x21], al
repe cmpsb byte [esi], byte es:[edi]
je 0x40c907
mov eax, dword [esp + 0x18]
movzx ecx, byte [ebx + eax + 2]
lea ebx, [ebx + ecx + 4]
lea edx, [ebx + 4]
cmp edx, dword [esp + 0x24]
jb 0x40c8c5
jmp 0x40ca1b
mov esi, dword [esp + 0x18]
movzx eax, byte [ebx + esi + 4]
mov ecx, eax
mov edx, eax
shr ecx, 1
shr edx, 2
and cl, 1
and dl, 1
add ebx, 5
test al, 1
mov byte [esp + 0x17], cl
mov byte [esp + 0x16], dl
je 0x40c97e
movzx ecx, byte [ebx + esi + 1]
movzx edx, byte [ebx + esi]
xor eax, eax
mov ah, byte [ebx + esi + 3]
push 0
add ebx, 4
push 0x989680
mov al, byte [ebx + esi - 2]
shl eax, 8
or eax, ecx
shl eax, 8
or eax, edx
cdq
add eax, 0xb6109100
adc edx, 2
push edx
push eax
call fcn.004f04b0
mov ecx, edx
sar ecx, 0x1f
mov cl, byte [esp + 0x17]
mov dword [ebp + 0x224], edx
mov dl, byte [esp + 0x16]
mov dword [ebp + 0x220], eax
test cl, cl
je 0x40c9ce
movzx edx, byte [ebx + esi + 1]
movzx ecx, byte [ebx + esi]
xor eax, eax
mov ah, byte [ebx + esi + 3]
push 0
add ebx, 4
push 0x989680
mov al, byte [ebx + esi - 2]
shl eax, 8
or eax, edx
shl eax, 8
or eax, ecx
cdq
add eax, 0xb6109100
adc edx, 2
push edx
push eax
call fcn.004f04b0
mov ecx, edx
mov dword [ebp + 0x214], edx
mov dl, byte [esp + 0x16]
sar ecx, 0x1f
mov dword [ebp + 0x210], eax
test dl, dl
je 0x40ca1b
mov eax, dword [esp + 0x18]
movzx ecx, byte [ebx + eax + 1]
xor edx, edx
mov dh, byte [ebx + eax + 3]
push 0
push 0x989680
mov dl, byte [ebx + eax + 2]
movzx eax, byte [ebx + eax]
shl edx, 8
or edx, ecx
shl edx, 8
or eax, edx
cdq
add eax, 0xb6109100
adc edx, 2
push edx
push eax
call fcn.004f04b0
mov ecx, edx
sar ecx, 0x1f
mov dword [ebp + 0x218], eax
mov dword [ebp + 0x21c], edx
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40ca2c
push eax
call sub.MFC80U.DLL_Ordinal_764
add esp, 4
mov edi, dword [esp + 0x39c]
mov eax, dword [esp + 0x39c]
mov edx, dword [esp + 0x3a0]
add edi, 8
mov ecx, 0x8c
mov esi, ebp
rep movsd dword es:[edi], dword [esi]
mov dword [eax + 0x238], edx
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x388
ret 0xc
pop edi
pop esi
pop ebp
mov eax, 0x10000
pop ebx
add esp, 0x388
ret 0xc