Function at 0x40c610
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x354
mov eax, dword [0x44aba4]
xor eax, esp
mov dword [esp + 0x350], eax
push ebx
push ebp
mov ebp, dword [esp + 0x360]
push esi
or esi, 0xffffffff
cmp dword [ebp + 4], esi
push edi
mov ebx, ecx
je 0x40c641
mov edi, dword [ebp]
call fcn.0040bdb0
mov edi, dword [esp + 0x36c]
mov dword [ebp + 4], esi
mov esi, dword [ebp]
cmp edi, dword [esi + 4]
jl 0x40c65d
mov eax, 0x10000
jmp 0x40c8fc
cmp edi, dword [esi + 0x10]
jge 0x40c667
call fcn.0040b690
mov eax, dword [ebp]
cmp dword [eax + 0x10], edi
jge 0x40c6c3
nop
mov esi, dword [ebp]
test esi, esi
je 0x40c6bb
cmp dword [esi + 0x18], 0
je 0x40c6bb
mov eax, dword [esi + 0x10]
add eax, 1
cmp eax, dword [esi + 4]
je 0x40c6bb
mov ecx, dword [esi + 0x50]
add ecx, dword [esi + 0x4c]
mov edx, dword [esi + 0x48]
push 0
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
mov eax, esi
call fcn.0040b240
add esp, 0x10
neg eax
sbb eax, eax
add eax, 1
mov dword [esi + 0x18], eax
mov ecx, dword [ebp]
cmp dword [ecx + 0x10], edi
jl 0x40c670
lea edx, [esp + 0x1c]
push edx
push edi
mov ecx, ebp
call fcn.0040bfa0
test byte [esp + 0x124], 0x10
mov al, byte [ebx]
je 0x40c717
cmp al, 0x2f
je 0x40c6ee
cmp al, 0x5c
je 0x40c6ee
test al, al
je 0x40c700
cmp byte [ebx + 1], 0x3a
jne 0x40c700
push ebx
push 0
call fcn.0040c4f0
add esp, 8
xor eax, eax
jmp 0x40c8fc
push ebx
add ebp, 0x140
push ebp
call fcn.0040c4f0
add esp, 8
xor eax, eax
jmp 0x40c8fc
test al, al
mov edi, ebx
mov ecx, ebx
je 0x40c735
nop
cmp al, 0x2f
je 0x40c728
cmp al, 0x5c
jne 0x40c72b
lea edi, [ecx + 1]
mov al, byte [ecx + 1]
add ecx, 1
test al, al
jne 0x40c720
lea edx, [esp + 0x14c]
mov eax, ebx
sub edx, ebx
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x40c740
cmp edi, ebx
jne 0x40c7c2
mov byte [esp + 0x14c], cl
push edi
lea ecx, [esp + 0x150]
push ecx
lea esi, [ebp + 0x140]
push esi
lea edx, [esp + 0x260]
push str._s_s_s
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
lea eax, [esp + 0x14c]
push eax
push esi
call fcn.0040c4f0
add esp, 8
mov ecx, dword [esp + 0x124]
push 0
push ecx
push 2
push 0
push 0
push 0x40000000
lea edx, [esp + 0x26c]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40c826
mov eax, 0x200
jmp 0x40c8fc
mov eax, edi
sub eax, ebx
mov byte [esp + eax + 0x14c], 0
mov al, byte [esp + 0x14c]
cmp al, 0x2f
je 0x40c7f3
cmp al, 0x5c
je 0x40c7f3
test al, al
je 0x40c757
cmp byte [esp + 0x14d], 0x3a
jne 0x40c757
push edi
lea ecx, [esp + 0x150]
push ecx
lea edx, [esp + 0x25c]
push str._s_s
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [esp + 0x15c]
push eax
push 0
call fcn.0040c4f0
add esp, 0x18
jmp 0x40c78e
mov eax, dword [ebp + 0x138]
push eax
mov eax, dword [ebp]
call fcn.0040b9c0
add esp, 4
cmp dword [ebp + 0x13c], 0
jne 0x40c854
push 0x4000
call fcn.00415b70
add esp, 4
mov dword [ebp + 0x13c], eax
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [esp + 0x14], 0
mov edx, dword [ebp + 0x13c]
mov eax, dword [ebp]
lea ecx, [esp + 0x13]
push ecx
push edx
mov ecx, 0x4000
call fcn.0040bb40
mov esi, eax
add esp, 8
cmp esi, 0xffffff96
je 0x40c8b6
test esi, esi
jl 0x40c8ac
jle 0x40c8a1
mov ecx, dword [ebp + 0x13c]
push 0
lea eax, [esp + 0x1c]
push eax
push esi
push ecx
push edi
call ebx
test eax, eax
je 0x40c8c0
cmp byte [esp + 0x13], 0
jne 0x40c8ca
test esi, esi
jne 0x40c862
mov dword [esp + 0x14], 0x5000000
jmp 0x40c8e9
mov dword [esp + 0x14], 0x1000
jmp 0x40c8e9
mov dword [esp + 0x14], 0x400
jmp 0x40c8e9
lea edx, [esp + 0x138]
push edx
lea eax, [esp + 0x12c]
push eax
lea ecx, [esp + 0x138]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp]
call fcn.0040bdb0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x360]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004200b3
add esp, 0x354
ret 8