Function at 0x409e7e
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x344
mov eax, dword [0x431418]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push esi
mov esi, ecx
push edi
mov edi, dword [ebp + 0xc]
cmp eax, 3
je 0x409eb8
cmp eax, 2
je 0x409eaf
cmp eax, 1
jne 0x409f85
cmp eax, 3
jne 0x409f69
mov ebx, dword [ebp + 8]
cmp ebx, dword [esi + 4]
je 0x409f09
cmp dword [esi + 4], 0xffffffff
je 0x409ece
push dword [esi]
call fcn.0040c7bc
pop ecx
mov eax, dword [esi]
or dword [esi + 4], 0xffffffff
cmp ebx, dword [eax + 4]
jge 0x409f85
cmp ebx, dword [eax + 0x10]
jge 0x409ef1
push eax
call fcn.0040c81e
jmp 0x409ef0
push eax
call fcn.0040c85d
pop ecx
mov eax, dword [esi]
cmp dword [eax + 0x10], ebx
jl 0x409eea
push dword [esi + 0x138]
push eax
call fcn.0040c968
pop ecx
pop ecx
mov dword [esi + 4], ebx
lea eax, [ebp - 0x339]
push eax
push dword [ebp + 0x10]
push edi
push dword [esi]
call fcn.0040cc18
mov edi, eax
add esp, 0x10
test edi, edi
jg 0x409f30
push dword [esi]
call fcn.0040c7bc
or dword [esi + 4], 0xffffffff
pop ecx
cmp byte [ebp - 0x339], 0
jne 0x409fc7
test edi, edi
jle 0x409f57
mov eax, 0x600
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040d595
leave
ret 0x10
cmp edi, 0xffffff96
mov eax, 0x5000000
mov ecx, 0x1000
cmove eax, ecx
jmp 0x409f46
cmp dword [esi + 4], 0xffffffff
je 0x409f77
push dword [esi]
call fcn.0040c7bc
pop ecx
mov eax, dword [esi]
or dword [esi + 4], 0xffffffff
mov ebx, dword [ebp + 8]
cmp ebx, dword [eax + 4]
jl 0x409f8c
mov eax, 0x10000
jmp 0x409f46
cmp ebx, dword [eax + 0x10]
jge 0x409fa0
push eax
call fcn.0040c81e
jmp 0x409f9f
push eax
call fcn.0040c85d
pop ecx
mov eax, dword [esi]
cmp dword [eax + 0x10], ebx
jl 0x409f99
lea eax, [ebp - 0x338]
mov ecx, esi
push eax
push ebx
call fcn.004097d3
xor edx, edx
inc edx
test byte [ebp - 0x230], 0x10
je 0x40a007
cmp dword [ebp + 0x14], edx
jne 0x409fce
xor eax, eax
jmp 0x409f46
mov al, byte [edi]
cmp al, 0x2f
je 0x409fef
cmp al, 0x5c
je 0x409fef
test al, al
je 0x409fe2
cmp byte [edi + 1], 0x3a
je 0x409fef
mov byte [ebp - 0x340], 0
mov edx, dword [ebp - 0x340]
xor ecx, ecx
lea eax, [esi + 0x140]
test dl, dl
push edi
cmove ecx, eax
push ecx
call fcn.004095f4
pop ecx
pop ecx
jmp 0x409fc7
xor ebx, ebx
cmp dword [ebp + 0x14], edx
je 0x40a105
mov al, byte [edi]
mov ecx, edi
mov dword [ebp - 0x340], edi
jmp 0x40a036
cmp al, 0x2f
je 0x40a029
cmp al, 0x5c
je 0x40a029
inc ecx
jmp 0x40a034
lea eax, [ecx + 1]
mov dword [ebp - 0x340], eax
mov ecx, eax
mov al, byte [ecx]
test al, al
jne 0x40a01e
push edi
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.00411193
mov ecx, dword [ebp - 0x340]
add esp, 0xc
cmp ecx, edi
jne 0x40a061
mov byte [ebp - 0x108], bl
jmp 0x40a092
mov eax, ecx
sub eax, edi
cmp eax, 0x104
jae 0x40a1e2
mov byte [ebp + eax - 0x108], bl
mov al, byte [ebp - 0x108]
cmp al, 0x2f
je 0x40a0b8
cmp al, 0x5c
je 0x40a0b8
test al, al
je 0x40a092
cmp byte [ebp - 0x107], 0x3a
je 0x40a0b8
push ecx
lea eax, [ebp - 0x108]
push eax
lea edi, [esi + 0x140]
push edi
lea eax, [ebp - 0x20c]
push str._s_s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
jmp 0x40a0d7
push ecx
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x20c]
push 0x426598
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov edi, ebx
lea eax, [ebp - 0x108]
push eax
push edi
call fcn.004095f4
pop ecx
pop ecx
push ebx
push dword [ebp - 0x230]
lea eax, [ebp - 0x20c]
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40a114
mov eax, 0x200
jmp 0x409f46
push dword [esi + 0x138]
push dword [esi]
call fcn.0040c968
pop ecx
pop ecx
cmp dword [esi + 0x13c], ebx
jne 0x40a13c
push 0x4000
call fcn.0040dde2
pop ecx
mov dword [esi + 0x13c], eax
lea eax, [ebp - 0x339]
push eax
push 0x4000
push dword [esi + 0x13c]
push dword [esi]
call fcn.0040cc18
add esp, 0x10
mov dword [ebp - 0x340], eax
cmp eax, 0xffffff96
je 0x40a1c1
test eax, eax
js 0x40a195
jle 0x40a189
push ebx
lea ecx, [ebp - 0x344]
push ecx
push eax
push dword [esi + 0x13c]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40a19c
mov eax, dword [ebp - 0x340]
cmp byte [ebp - 0x339], bl
jne 0x40a1a3
test eax, eax
jne 0x40a13c
mov ebx, 0x5000000
jmp 0x40a1c6
mov ebx, 0x400
jmp 0x40a1c6
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x224]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
jmp 0x40a1c6
mov ebx, 0x1000
cmp dword [ebp + 0x14], 1
je 0x40a1d3
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esi]
call fcn.0040c7bc
pop ecx
mov eax, ebx
jmp 0x409f46
call fcn.0040dd07
int3