Function at 0x40c430
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x4338
call fcn.0040f510
mov eax, dword [esp + 0x433c]
test eax, eax
jne 0x40c456
mov eax, 0x10000
mov dword [0x431a18], eax
add esp, 0x4338
ret
cmp dword [eax], 1
je 0x40c46c
mov eax, 0x80000
mov dword [0x431a18], eax
add esp, 0x4338
ret
push ebp
mov ebp, dword [eax + 4]
mov eax, dword [ebp + 4]
push esi
or esi, 0xffffffff
cmp eax, esi
je 0x40c487
mov eax, dword [ebp]
push eax
call fcn.004099e0
add esp, 4
mov eax, dword [ebp]
mov dword [ebp + 4], esi
mov esi, dword [esp + 0x4348]
cmp esi, dword [eax + 4]
jl 0x40c4ac
mov eax, 0x10000
pop esi
pop ebp
mov dword [0x431a18], eax
add esp, 0x4338
ret
cmp esi, dword [eax + 0x10]
jge 0x40c4ba
push eax
call fcn.00409720
add esp, 4
mov ecx, dword [ebp]
cmp dword [ecx + 0x10], esi
jge 0x40c4d8
mov edx, dword [ebp]
push edx
call fcn.00409770
mov eax, dword [ebp]
mov ecx, dword [eax + 0x10]
add esp, 4
cmp ecx, esi
jl 0x40c4c2
lea ecx, [esp + 0x214]
push ecx
push esi
mov ecx, ebp
call fcn.00409bc0
test byte [esp + 0x31c], 0x10
je 0x40c519
lea edx, [esp + 0x218]
push edx
add ebp, 0x13c
push ebp
call fcn.0040a040
add esp, 8
xor eax, eax
pop esi
pop ebp
mov dword [0x431a18], eax
add esp, 0x4338
ret
lea eax, [ebp + 0x13c]
lea edx, [esp + 0xc]
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x40c525
mov eax, dword [esp + 0x434c]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40c538
push edi
lea edi, [esp + 0x10]
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x40c547
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov al, byte [esp + 0x10]
test al, al
lea edx, [esp + 0x10]
push ebx
mov ecx, edx
je 0x40c622
cmp al, 0x2f
je 0x40c578
cmp al, 0x5c
jne 0x40c57b
lea edx, [ecx + 1]
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x40c570
lea eax, [esp + 0x14]
cmp edx, eax
je 0x40c622
xor eax, eax
mov cl, byte [esp + eax + 0x14]
mov byte [esp + eax + 0x118], cl
inc eax
test cl, cl
jne 0x40c591
lea ecx, [esp + 0x14]
sub edx, ecx
mov byte [esp + edx + 0x117], 0
mov al, byte [esp + 0x118]
test al, al
je 0x40c5d0
cmp al, 0x2f
je 0x40c5d0
cmp al, 0x5c
je 0x40c5d0
cmp byte [esp + 0x119], 0x3a
je 0x40c5d0
xor bl, bl
jmp 0x40c5d2
mov bl, 1
lea edx, [esp + 0x118]
push 0x4283fc
push edx
call fcn.0040f698
mov esi, eax
lea eax, [esp + 0x120]
push 0x4283f8
push eax
call fcn.0040f698
add esp, 0x10
test eax, eax
setne cl
test esi, esi
setne dl
or cl, dl
or cl, bl
jne 0x40c622
lea eax, [esp + 0x118]
push eax
lea eax, [ebp + 0x13c]
push eax
call fcn.0040a040
add esp, 8
mov ecx, dword [esp + 0x324]
push 0
push ecx
push 2
push 0
push 0
push 0x40000000
lea edx, [esp + 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40c65e
pop ebx
pop edi
mov eax, 0x200
pop esi
pop ebp
mov dword [0x431a18], eax
add esp, 0x4338
ret
mov eax, dword [ebp + 0x138]
mov ecx, dword [ebp]
push eax
push ecx
call fcn.0040ba70
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
add esp, 8
xor ebx, ebx
lea esp, [esp]
mov eax, dword [ebp]
push 0x4000
lea edx, [esp + 0x34c]
push edx
push eax
call fcn.0040bc00
add esp, 0xc
cmp eax, 0xffffff96
je 0x40c6c2
test eax, eax
jl 0x40c6c9
je 0x40c6d0
push 0
lea ecx, [esp + 0x14]
push ecx
push eax
lea edx, [esp + 0x354]
push edx
push esi
call edi
test eax, eax
jne 0x40c680
mov ebx, 0x400
jmp 0x40c6ef
mov ebx, 0x1000
jmp 0x40c6ef
mov ebx, 0x5000000
jmp 0x40c6ef
lea eax, [esp + 0x338]
push eax
lea ecx, [esp + 0x32c]
push ecx
lea edx, [esp + 0x338]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp]
push eax
call fcn.004099e0
add esp, 4
mov eax, ebx
pop ebx
pop edi
pop esi
pop ebp
mov dword [0x431a18], eax
add esp, 0x4338
ret