Function at 0x40bf60
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x4338
call fcn.0040f510
push ebp
push esi
push edi
mov edi, dword [esp + 0x4354]
cmp edi, 3
mov ebp, ecx
je 0x40bf9e
cmp edi, 2
je 0x40c07b
cmp edi, 1
je 0x40c07b
pop edi
pop esi
mov eax, 0x10000
pop ebp
add esp, 0x4338
ret 0x10
mov eax, dword [ebp + 4]
mov esi, dword [esp + 0x4348]
cmp esi, eax
je 0x40c00e
cmp eax, 0xffffffff
je 0x40bfbd
mov eax, dword [ebp]
push eax
call fcn.004099e0
add esp, 4
mov eax, dword [ebp]
mov dword [ebp + 4], 0xffffffff
cmp esi, dword [eax + 4]
jge 0x40bf8d
cmp esi, dword [eax + 0x10]
jge 0x40bfda
push eax
call fcn.00409720
add esp, 4
mov ecx, dword [ebp]
cmp dword [ecx + 0x10], esi
jge 0x40bff8
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 0x40bfe2
mov ecx, dword [ebp + 0x138]
mov edx, dword [ebp]
push ecx
push edx
call fcn.0040ba70
add esp, 8
mov dword [ebp + 4], esi
mov eax, dword [esp + 0x4350]
mov ecx, dword [esp + 0x434c]
mov edx, dword [ebp]
push eax
push ecx
push edx
call fcn.0040bc00
mov esi, eax
add esp, 0xc
test esi, esi
jle 0x40c041
pop edi
pop esi
mov eax, 0x600
pop ebp
add esp, 0x4338
ret 0x10
mov eax, dword [ebp]
push eax
call fcn.004099e0
add esp, 4
xor eax, eax
test esi, esi
mov dword [ebp + 4], 0xffffffff
je 0x40c32f
cmp esi, 0xffffff96
setne al
pop edi
pop esi
pop ebp
dec eax
and eax, 0xfb001000
add eax, 0x5000000
add esp, 0x4338
ret 0x10
mov eax, dword [ebp + 4]
or esi, 0xffffffff
cmp eax, esi
je 0x40c091
mov ecx, dword [ebp]
push ecx
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]
jge 0x40bf8d
cmp esi, dword [eax + 0x10]
jge 0x40c0b5
push eax
call fcn.00409720
add esp, 4
mov edx, dword [ebp]
cmp dword [edx + 0x10], esi
jge 0x40c0d6
lea ecx, [ecx]
mov eax, dword [ebp]
push eax
call fcn.00409770
mov ecx, dword [ebp]
mov eax, dword [ecx + 0x10]
add esp, 4
cmp eax, esi
jl 0x40c0c0
lea edx, [esp + 0x218]
push edx
push esi
mov ecx, ebp
call fcn.00409bc0
test byte [esp + 0x320], 0x10
je 0x40c11a
cmp edi, 1
je 0x40c10c
lea eax, [esp + 0x21c]
push eax
add ebp, 0x13c
push ebp
call fcn.0040a040
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x4338
ret 0x10
cmp edi, 1
push ebx
jne 0x40c12c
mov esi, dword [esp + 0x4350]
jmp 0x40c262
lea eax, [ebp + 0x13c]
lea edx, [esp + 0x14]
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x40c138
mov eax, dword [esp + 0x4350]
mov esi, eax
jmp 0x40c150
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40c150
lea edi, [esp + 0x14]
sub eax, esi
dec edi
mov edi, edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x40c160
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 + 0x14]
test al, al
lea edx, [esp + 0x14]
mov ecx, edx
je 0x40c240
cmp al, 0x2f
je 0x40c190
cmp al, 0x5c
jne 0x40c193
lea edx, [ecx + 1]
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x40c188
lea ecx, [esp + 0x14]
cmp edx, ecx
je 0x40c240
xor eax, eax
lea esp, [esp]
mov cl, byte [esp + eax + 0x14]
mov byte [esp + eax + 0x118], cl
inc eax
test cl, cl
jne 0x40c1b0
lea eax, [esp + 0x14]
sub edx, eax
mov byte [esp + edx + 0x117], cl
mov al, byte [esp + 0x118]
test al, al
je 0x40c1ee
cmp al, 0x2f
je 0x40c1ee
cmp al, 0x5c
je 0x40c1ee
cmp byte [esp + 0x119], 0x3a
je 0x40c1ee
xor bl, bl
jmp 0x40c1f0
mov bl, 1
lea ecx, [esp + 0x118]
push 0x4283fc
push ecx
call fcn.0040f698
lea edx, [esp + 0x120]
push 0x4283f8
push edx
mov esi, eax
call fcn.0040f698
add esp, 0x10
test eax, eax
setne al
test esi, esi
setne cl
or al, cl
or al, bl
jne 0x40c240
lea edx, [esp + 0x118]
push edx
lea eax, [ebp + 0x13c]
push eax
call fcn.0040a040
add esp, 8
mov eax, dword [esp + 0x324]
push 0
push eax
push 2
push 0
push 0
push 0x40000000
lea ecx, [esp + 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40c279
pop ebx
pop edi
pop esi
mov eax, 0x200
pop ebp
add esp, 0x4338
ret 0x10
mov edx, dword [ebp + 0x138]
mov eax, dword [ebp]
push edx
push eax
call fcn.0040ba70
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
add esp, 8
xor ebx, ebx
jmp 0x40c2a0
mov edx, dword [ebp]
push 0x4000
lea ecx, [esp + 0x34c]
push ecx
push edx
call fcn.0040bc00
add esp, 0xc
cmp eax, 0xffffff96
je 0x40c2e2
test eax, eax
jl 0x40c2e9
je 0x40c2f0
push 0
lea ecx, [esp + 0x14]
push ecx
push eax
lea edx, [esp + 0x354]
push edx
push esi
call edi
test eax, eax
jne 0x40c2a0
mov ebx, 0x400
jmp 0x40c30f
mov ebx, 0x1000
jmp 0x40c30f
mov ebx, 0x5000000
jmp 0x40c30f
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]
cmp dword [esp + 0x4358], 1
je 0x40c320
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
add esp, 0x4338
ret 0x10