Function at 0x409f9f
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x65c
mov eax, dword [0x434018]
xor eax, esp
mov dword [esp + 0x658], eax
cmp dword [ebp + 0x14], 3
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov esi, ecx
je 0x40a263
cmp dword [ebp + 0x14], 2
je 0x409fdb
cmp dword [ebp + 0x14], 1
jne 0x40a283
cmp dword [esi + 4], 0xffffffff
je 0x409fe8
mov ecx, dword [esi]
call fcn.00409749
mov eax, dword [esi]
or dword [esi + 4], 0xffffffff
mov ebx, dword [ebp + 8]
cmp ebx, dword [eax + 4]
jge 0x40a283
cmp dword [eax + 0x10], ebx
jle 0x40a014
mov ecx, eax
call fcn.00409187
jmp 0x40a00f
mov ecx, dword [esi]
call fcn.004091be
mov eax, dword [esi]
cmp dword [eax + 0x10], ebx
jl 0x40a008
lea eax, [esp + 0x20]
mov ecx, esi
push eax
push ebx
call fcn.0040997e
test byte [esp + 0x22c], 0x10
je 0x40a066
cmp dword [ebp + 0x14], 1
je 0x40a2dd
movzx eax, word [edi]
cmp eax, 0x2f
je 0x40a058
cmp eax, 0x5c
je 0x40a058
test ax, ax
je 0x40a050
cmp word [edi + 2], 0x3a
je 0x40a058
lea ecx, [esi + 0x244]
jmp 0x40a05a
xor ecx, ecx
mov edx, edi
call fcn.00409e73
jmp 0x40a2dd
xor ebx, ebx
cmp dword [ebp + 0x14], 1
je 0x40a190
movzx eax, word [edi]
mov edx, edi
mov ecx, edi
mov dword [esp + 0x1c], 0x2f
mov dword [esp + 0x14], 0x5c
jmp 0x40a0a2
cmp ax, word [esp + 0x1c]
je 0x40a099
cmp ax, word [esp + 0x14]
jne 0x40a09c
lea edx, [ecx + 2]
add ecx, 2
movzx eax, word [ecx]
test ax, ax
jne 0x40a08b
lea eax, [esp + 0x250]
mov ecx, edi
sub eax, edi
mov ebx, eax
movzx eax, word [ecx]
mov word [ebx + ecx], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x40a0b4
push 0
pop ebx
cmp edx, edi
jne 0x40a0d6
xor eax, eax
mov word [esp + 0x250], ax
jmp 0x40a118
mov eax, edx
sub eax, edi
and eax, 0xfffffffe
cmp eax, 0x208
jae 0x40a313
xor ecx, ecx
mov word [esp + eax + 0x250], cx
mov ax, word [esp + 0x250]
cmp ax, word [esp + 0x1c]
je 0x40a140
cmp ax, word [esp + 0x14]
je 0x40a140
test ax, ax
je 0x40a118
cmp word [esp + 0x252], 0x3a
je 0x40a140
push edx
lea eax, [esp + 0x254]
push eax
lea edi, [esi + 0x244]
push edi
lea eax, [esp + 0x464]
push str._s_s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
jmp 0x40a161
push edx
lea eax, [esp + 0x254]
push eax
lea eax, [esp + 0x460]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
mov edi, ebx
lea edx, [esp + 0x250]
mov ecx, edi
call fcn.00409e73
push ebx
push dword [esp + 0x230]
lea eax, [esp + 0x460]
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40a19f
mov eax, 0x200
jmp 0x40a2fc
mov edx, dword [esi + 0x23c]
mov ecx, dword [esi]
call fcn.004093a2
cmp dword [esi + 0x240], ebx
jne 0x40a1c5
push 0x4000
call fcn.0040b05d
pop ecx
mov dword [esi + 0x240], eax
mov edx, dword [esi + 0x240]
lea eax, [esp + 0x13]
mov ecx, dword [esi]
push eax
push 0x4000
call fcn.004094f3
mov dword [esp + 0x20], eax
pop ecx
pop ecx
cmp eax, 0xffffff96
je 0x40a243
test eax, eax
js 0x40a214
jle 0x40a209
push ebx
lea ecx, [esp + 0x18]
push ecx
push eax
push dword [esi + 0x240]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40a21b
mov eax, dword [esp + 0x18]
cmp byte [esp + 0x13], 0
jne 0x40a222
test eax, eax
jne 0x40a1c5
mov ebx, 0x5000000
jmp 0x40a248
mov ebx, 0x400
jmp 0x40a248
lea eax, [esp + 0x240]
push eax
lea eax, [esp + 0x234]
push eax
lea eax, [esp + 0x240]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
jmp 0x40a248
mov ebx, 0x1000
cmp dword [ebp + 0x14], 1
je 0x40a255
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esi]
call fcn.00409749
mov eax, ebx
jmp 0x40a2fc
mov ebx, dword [ebp + 8]
cmp ebx, dword [esi + 4]
je 0x40a2b2
cmp dword [esi + 4], 0xffffffff
je 0x40a278
mov ecx, dword [esi]
call fcn.00409749
mov ecx, dword [esi]
or dword [esi + 4], 0xffffffff
cmp ebx, dword [ecx + 4]
jl 0x40a28a
mov eax, 0x10000
jmp 0x40a2fc
cmp dword [ecx + 0x10], ebx
jle 0x40a2a2
call fcn.00409187
jmp 0x40a29d
mov ecx, dword [esi]
call fcn.004091be
mov ecx, dword [esi]
cmp dword [ecx + 0x10], ebx
jl 0x40a296
mov edx, dword [esi + 0x23c]
call fcn.004093a2
mov dword [esi + 4], ebx
mov ecx, dword [esi]
lea eax, [esp + 0x13]
push eax
push dword [ebp + 0x10]
mov edx, edi
call fcn.004094f3
mov edi, eax
pop ecx
pop ecx
test edi, edi
jg 0x40a2d6
mov ecx, dword [esi]
call fcn.00409749
or dword [esi + 4], 0xffffffff
cmp byte [esp + 0x13], 0
je 0x40a2e1
xor eax, eax
jmp 0x40a2fc
test edi, edi
jle 0x40a2ec
mov eax, 0x600
jmp 0x40a2fc
cmp edi, 0xffffff96
mov eax, 0x5000000
mov ecx, 0x1000
cmove eax, ecx
mov ecx, dword [esp + 0x664]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040a893
mov esp, ebp
pop ebp
ret 0x10
call fcn.0040a9c8
int3