Function at 0x40c9b0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x650
mov eax, dword [0x448370]
mov dword [esp + 0x64c], eax
mov eax, dword [esp + 0x654]
push ebx
xor ebx, ebx
cmp eax, ebx
jne 0x40c9da
mov eax, 0x10000
jmp 0x40cc95
cmp dword [eax], 1
je 0x40c9e9
mov eax, 0x80000
jmp 0x40cc95
push esi
push edi
mov edi, dword [eax + 4]
mov eax, dword [edi + 4]
or esi, 0xffffffff
cmp eax, esi
je 0x40ca03
mov eax, dword [edi]
push eax
call fcn.0040a1a0
add esp, 4
mov eax, dword [edi]
mov dword [edi + 4], esi
mov esi, dword [esp + 0x664]
cmp esi, dword [eax + 4]
jl 0x40ca1e
mov eax, 0x10000
jmp 0x40cc93
cmp esi, dword [eax + 0x10]
jge 0x40ca2c
push eax
call fcn.00409ee0
add esp, 4
mov ecx, dword [edi]
cmp dword [ecx + 0x10], esi
jge 0x40ca47
mov edx, dword [edi]
push edx
call fcn.00409f30
mov eax, dword [edi]
mov ecx, dword [eax + 0x10]
add esp, 4
cmp ecx, esi
jl 0x40ca33
lea ecx, [esp + 0x220]
push ecx
push esi
mov ecx, edi
call fcn.0040a2a0
mov edx, dword [esp + 0x42c]
shr edx, 4
test dl, 1
je 0x40cab0
mov ecx, dword [esp + 0x668]
mov ax, word [ecx]
cmp ax, 0x2f
je 0x40ca88
cmp ax, 0x5c
je 0x40ca88
cmp ax, bx
je 0x40ca99
cmp word [ecx + 2], 0x3a
jne 0x40ca99
push ecx
push ebx
call fcn.0040a870
add esp, 8
xor eax, eax
jmp 0x40cc93
push ecx
add edi, 0x244
push edi
call fcn.0040a870
add esp, 8
xor eax, eax
jmp 0x40cc93
mov esi, dword [esp + 0x668]
xor eax, eax
mov ax, word [esi]
cmp ax, bx
push ebp
mov word [esp + 0x454], bx
mov ebp, esi
mov ecx, esi
je 0x40caeb
mov edi, edi
cmp ax, 0x2f
je 0x40cadc
cmp ax, 0x5c
jne 0x40cadf
lea ebp, [ecx + 2]
mov ax, word [ecx + 2]
add ecx, 2
cmp ax, bx
jne 0x40cad0
push 0x104
lea eax, [esp + 0x20]
push esi
push eax
call fcn.0041926f
add esp, 0xc
cmp ebp, esi
jne 0x40cb65
mov word [esp + 0x1c], bx
push ebp
lea edx, [esp + 0x20]
push edx
lea esi, [edi + 0x244]
push esi
lea eax, [esp + 0x460]
push str._s_s_s
push eax
call fcn.0041881d
lea ecx, [esp + 0x30]
push ecx
push esi
call fcn.0040a870
add esp, 0x1c
mov edx, dword [esp + 0x430]
push ebx
push edx
push 2
push ebx
push ebx
push 0x40000000
lea eax, [esp + 0x46c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x40cbbd
mov eax, 0x200
jmp 0x40cc92
mov ecx, ebp
sub ecx, esi
sar ecx, 1
mov word [esp + ecx*2 + 0x1c], bx
mov ax, word [esp + 0x1c]
cmp ax, 0x2f
je 0x40cb92
cmp ax, 0x5c
je 0x40cb92
cmp ax, bx
je 0x40cb07
cmp word [esp + 0x1e], 0x3a
jne 0x40cb07
push ebp
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x45c]
push str._s_s
push eax
call fcn.0041881d
lea ecx, [esp + 0x2c]
push ecx
push ebx
call fcn.0040a870
add esp, 0x18
jmp 0x40cb34
mov ecx, dword [edi + 0x23c]
mov edx, dword [edi]
push ecx
push edx
call fcn.0040c380
mov eax, dword [edi + 0x240]
add esp, 8
cmp eax, ebx
jne 0x40cbec
push 0x4000
call fcn.00427448
add esp, 4
mov dword [edi + 0x240], eax
mov dword [esp + 0x14], ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x40cc00
mov ecx, dword [edi + 0x240]
mov edx, dword [edi]
lea eax, [esp + 0x13]
push eax
push 0x4000
push ecx
push edx
call fcn.0040c510
mov esi, eax
add esp, 0x10
cmp esi, 0xffffff96
je 0x40ccae
test esi, esi
jl 0x40cc4f
jle 0x40cc43
mov ecx, dword [edi + 0x240]
push 0
lea eax, [esp + 0x1c]
push eax
push esi
push ecx
push ebp
call ebx
test eax, eax
je 0x40ccb8
mov al, byte [esp + 0x13]
test al, al
jne 0x40cc57
test esi, esi
jne 0x40cc00
mov dword [esp + 0x14], 0x5000000
mov edx, dword [edi]
push edx
call fcn.0040a1a0
mov esi, dword [esp + 0x18]
add esp, 4
test esi, esi
jne 0x40cc89
lea eax, [esp + 0x444]
push eax
lea ecx, [esp + 0x438]
push ecx
lea edx, [esp + 0x444]
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop ebp
pop edi
pop esi
mov ecx, dword [esp + 0x650]
mov dword [0x449328], eax
pop ebx
call fcn.00418507
add esp, 0x650
ret
mov dword [esp + 0x14], 0x1000
jmp 0x40cc57
mov dword [esp + 0x14], 0x400
jmp 0x40cc57