Function at 0x409c4e
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x2c8]
sub esp, 0x348
mov eax, dword [0x5cd81c]
xor eax, ebp
mov dword [ebp + 0x2c4], eax
cmp dword [ebp + 0x2dc], 3
push ebx
mov ebx, dword [ebp + 0x2d4]
push esi
push edi
mov esi, ecx
je 0x409ca1
cmp dword [ebp + 0x2dc], 2
je 0x409d4d
cmp dword [ebp + 0x2dc], 1
je 0x409d4d
mov eax, 0x10000
jmp 0x409fba
mov eax, dword [esi + 4]
mov edi, dword [ebp + 0x2d0]
cmp edi, eax
je 0x409cf3
cmp eax, 0xffffffff
je 0x409cbb
push dword [esi]
call fcn.00407ea3
pop ecx
mov eax, dword [esi]
or dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jge 0x409c97
cmp edi, dword [eax + 0x10]
jge 0x409cdb
push eax
call fcn.00407c65
jmp 0x409cda
push dword [esi]
call fcn.00407ca3
pop ecx
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jl 0x409cd3
push dword [esi + 0x138]
push eax
call fcn.00409808
pop ecx
pop ecx
mov dword [esi + 4], edi
lea eax, [ebp - 0x71]
push eax
push dword [ebp + 0x2d8]
push ebx
push dword [esi]
call fcn.00409967
mov edi, eax
add esp, 0x10
test edi, edi
jg 0x409d1a
push dword [esi]
call fcn.00407ea3
or dword [esi + 4], 0xffffffff
pop ecx
cmp byte [ebp - 0x71], 0
je 0x409d27
xor eax, eax
jmp 0x409fba
test edi, edi
jle 0x409d35
mov eax, 0x600
jmp 0x409fba
xor eax, eax
cmp edi, 0xffffff96
setne al
dec eax
and eax, 0xfb001000
add eax, 0x5000000
jmp 0x409fba
cmp dword [esi + 4], 0xffffffff
je 0x409d5b
push dword [esi]
call fcn.00407ea3
pop ecx
mov eax, dword [esi]
mov edi, dword [ebp + 0x2d0]
or dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jge 0x409c97
cmp edi, dword [eax + 0x10]
jge 0x409d85
push eax
call fcn.00407c65
jmp 0x409d84
push dword [esi]
call fcn.00407ca3
pop ecx
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jl 0x409d7d
lea eax, [ebp - 0x70]
push eax
push edi
mov ecx, esi
call fcn.00408055
test byte [ebp + 0x98], 0x10
je 0x409ddc
cmp dword [ebp + 0x2dc], 1
je 0x409d20
mov al, byte [ebx]
cmp al, 0x2f
je 0x409dc2
cmp al, 0x5c
je 0x409dc2
test al, al
je 0x409dc7
cmp byte [ebx + 1], 0x3a
jne 0x409dc7
push ebx
push 0
jmp 0x409dcf
push ebx
add esi, 0x140
push esi
call fcn.004084d2
pop ecx
xor eax, eax
jmp 0x409fb9
cmp dword [ebp + 0x2dc], 1
jne 0x409ded
mov dword [ebp - 0x7c], ebx
jmp 0x409e78
mov al, byte [ebx]
mov edi, ebx
mov ecx, ebx
jmp 0x409e03
cmp al, 0x2f
je 0x409dfd
cmp al, 0x5c
jne 0x409e00
lea edi, [ecx + 1]
inc ecx
mov al, byte [ecx]
test al, al
jne 0x409df5
lea edx, [ebp + 0x1c0]
mov eax, ebx
sub edx, ebx
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x409e11
cmp edi, ebx
jne 0x409e88
mov byte [ebp + 0x1c0], cl
push edi
lea eax, [ebp + 0x1c0]
push eax
lea ebx, [esi + 0x140]
push ebx
lea eax, [ebp + 0xbc]
push 0x57bf70
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp + 0x1c0]
push eax
push ebx
call fcn.004084d2
add esp, 0x1c
xor eax, eax
push eax
push dword [ebp + 0x98]
push 2
push eax
push eax
push 0x40000000
lea eax, [ebp + 0xbc]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x7c], eax
cmp dword [ebp - 0x7c], 0xffffffff
jne 0x409ef0
mov eax, 0x200
jmp 0x409fba
mov eax, edi
sub eax, ebx
mov byte [ebp + eax + 0x1c0], 0
cmp byte [ebp + 0x1c0], 0x2f
je 0x409ec0
cmp byte [ebp + 0x1c0], 0x5c
je 0x409ec0
cmp byte [ebp + 0x1c0], 0
je 0x409e25
cmp byte [ebp + 0x1c1], 0x3a
jne 0x409e25
push edi
lea eax, [ebp + 0x1c0]
push eax
lea eax, [ebp + 0xbc]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp + 0x1c0]
push eax
push 0
call fcn.004084d2
add esp, 0x18
jmp 0x409e56
push dword [esi + 0x138]
push dword [esi]
call fcn.00409808
cmp dword [esi + 0x13c], 0
pop ecx
pop ecx
mov ebx, 0x4000
jne 0x409f1a
push ebx
call fcn.0040a258
pop ecx
mov dword [esi + 0x13c], eax
and dword [ebp - 0x78], 0
lea eax, [ebp - 0x71]
push eax
push ebx
push dword [esi + 0x13c]
push dword [esi]
call fcn.00409967
mov edi, eax
add esp, 0x10
cmp edi, 0xffffff96
je 0x409f6d
test edi, edi
jl 0x409f64
jle 0x409f5a
push 0
lea eax, [ebp - 0x80]
push eax
push edi
push dword [esi + 0x13c]
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x409f76
cmp byte [ebp - 0x71], 0
jne 0x409f7f
test edi, edi
jne 0x409f1e
mov dword [ebp - 0x78], 0x5000000
jmp 0x409f9d
mov dword [ebp - 0x78], 0x1000
jmp 0x409f9d
mov dword [ebp - 0x78], 0x400
jmp 0x409f9d
lea eax, [ebp + 0xac]
push eax
lea eax, [ebp + 0x9c]
push eax
lea eax, [ebp + 0xa4]
push eax
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x2dc], 1
je 0x409faf
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esi]
call fcn.00407ea3
mov eax, dword [ebp - 0x78]
pop ecx
mov ecx, dword [ebp + 0x2c4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00514038
add ebp, 0x2c8
leave
ret 0x10