Function at 0x40cc00
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x654
push ebx
push ebp
mov ebp, dword [esp + 0x664]
push esi
push edi
mov edi, eax
or esi, 0xffffffff
cmp dword [edi + 4], esi
je 0x40cc22
mov ebx, dword [edi]
call fcn.0040c380
mov ebx, dword [esp + 0x668]
mov dword [edi + 4], esi
mov esi, dword [edi]
cmp ebx, dword [esi + 4]
jl 0x40cc45
mov eax, 0x10000
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x654
ret 8
cmp ebx, dword [esi + 0x10]
jge 0x40cc4f
call fcn.0040bd10
mov eax, dword [edi]
cmp dword [eax + 0x10], ebx
jge 0x40cca7
mov esi, dword [edi]
test esi, esi
je 0x40cca0
cmp dword [esi + 0x18], 0
je 0x40cca0
mov eax, dword [esi + 0x10]
add eax, 1
cmp eax, dword [esi + 4]
je 0x40cca0
mov ecx, dword [esi + 0x50]
add ecx, dword [esi + 0x4c]
mov edx, dword [esi + 0x48]
lea ecx, [ecx + edx + 0x2e]
add dword [esi + 0x14], ecx
mov dword [esi + 0x10], eax
push 0
lea edx, [esi + 0x78]
push edx
lea eax, [esi + 0x28]
push eax
xor eax, eax
mov ecx, esi
call fcn.0040ba90
add esp, 0xc
neg eax
sbb eax, eax
add eax, 1
mov dword [esi + 0x18], eax
mov ecx, dword [edi]
cmp dword [ecx + 0x10], ebx
jl 0x40cc56
lea edx, [esp + 0x228]
push edx
push ebx
push edi
call fcn.0040c510
mov eax, dword [esp + 0x434]
shr eax, 4
test al, 1
movzx eax, word [ebp]
je 0x40cd19
cmp ax, 0x2f
je 0x40cce0
cmp ax, 0x5c
je 0x40cce0
test ax, ax
je 0x40ccfa
cmp word [ebp + 2], 0x3a
jne 0x40ccfa
push ebp
push 0
call fcn.0040ca80
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x654
ret 8
push ebp
add edi, 0x244
push edi
call fcn.0040ca80
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x654
ret 8
xor ebx, ebx
cmp ax, bx
mov word [esp + 0x458], bx
mov esi, ebp
mov ecx, ebp
je 0x40cd4b
movzx eax, ax
nop
cmp ax, 0x2f
je 0x40cd3c
cmp ax, 0x5c
jne 0x40cd3f
lea esi, [ecx + 2]
movzx eax, word [ecx + 2]
add ecx, 2
cmp ax, bx
jne 0x40cd30
push 0x104
lea ecx, [esp + 0x24]
push ebp
push ecx
call dword [sym.imp.MSVCR80.dll_wcsncpy]
add esp, 0xc
cmp esi, ebp
jne 0x40cdcf
mov word [esp + 0x20], bx
push esi
lea edx, [esp + 0x24]
push edx
lea ebx, [edi + 0x244]
push ebx
push str._s_s_s
lea edx, [esp + 0x468]
call fcn.00408cd0
lea eax, [esp + 0x30]
push eax
push ebx
call fcn.0040ca80
add esp, 0x18
xor ebx, ebx
mov ecx, dword [esp + 0x434]
push ebx
push ecx
push 2
push ebx
push ebx
push 0x40000000
lea edx, [esp + 0x470]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x40ce2d
mov eax, 0x200
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x654
ret 8
mov edx, esi
sub edx, ebp
sar edx, 1
mov word [esp + edx*2 + 0x20], bx
mov ax, word [esp + 0x20]
cmp ax, 0x2f
je 0x40ce00
cmp ax, 0x5c
je 0x40ce00
cmp ax, bx
je 0x40cd68
cmp word [esp + 0x22], 0x3a
jne 0x40cd68
push esi
lea eax, [esp + 0x24]
push eax
push str._s_s
lea edx, [esp + 0x464]
call fcn.00408cd0
add esp, 0xc
lea ecx, [esp + 0x20]
push ecx
push ebx
call fcn.0040ca80
add esp, 8
jmp 0x40cd96
mov eax, dword [edi + 0x23c]
mov ecx, dword [edi]
push eax
push ecx
call fcn.0040bf90
add esp, 8
cmp dword [edi + 0x240], ebx
jne 0x40ce5a
push 0x4000
call sub.MFC80U.DLL_Ordinal_762
add esp, 4
mov dword [edi + 0x240], eax
mov dword [esp + 0x18], ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [edi + 0x240]
lea edx, [esp + 0x17]
push edx
push eax
mov eax, dword [edi]
mov ecx, 0x4000
call fcn.0040c110
mov esi, eax
add esp, 8
cmp esi, 0xffffff96
je 0x40cef9
test esi, esi
jl 0x40cead
jle 0x40cea2
mov edx, dword [edi + 0x240]
push 0
lea ecx, [esp + 0x20]
push ecx
push esi
push edx
push ebp
call ebx
test eax, eax
je 0x40cf03
cmp byte [esp + 0x17], 0
jne 0x40ceb5
test esi, esi
jne 0x40ce64
mov dword [esp + 0x18], 0x5000000
mov ebx, dword [edi]
call fcn.0040c380
mov esi, dword [esp + 0x18]
test esi, esi
jne 0x40cee3
lea eax, [esp + 0x448]
push eax
lea ecx, [esp + 0x43c]
push ecx
lea edx, [esp + 0x448]
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x654
ret 8
mov dword [esp + 0x18], 0x1000
jmp 0x40ceb5
mov dword [esp + 0x18], 0x400
jmp 0x40ceb5