Function at 0x409e2e
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x344
mov eax, dword [0x431440]
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 0x409e68
cmp eax, 2
je 0x409e5f
cmp eax, 1
jne 0x409f35
cmp eax, 3
jne 0x409f19
mov ebx, dword [ebp + 8]
cmp ebx, dword [esi + 4]
je 0x409eb9
cmp dword [esi + 4], 0xffffffff
je 0x409e7e
push dword [esi]
call fcn.0040c830
pop ecx
mov eax, dword [esi]
or dword [esi + 4], 0xffffffff
cmp ebx, dword [eax + 4]
jge 0x409f35
cmp ebx, dword [eax + 0x10]
jge 0x409ea1
push eax
call fcn.0040c892
jmp 0x409ea0
push eax
call fcn.0040c8d1
pop ecx
mov eax, dword [esi]
cmp dword [eax + 0x10], ebx
jl 0x409e9a
push dword [esi + 0x138]
push eax
call fcn.0040c9dc
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.0040cc8d
mov edi, eax
add esp, 0x10
test edi, edi
jg 0x409ee0
push dword [esi]
call fcn.0040c830
or dword [esi + 4], 0xffffffff
pop ecx
cmp byte [ebp - 0x339], 0
jne 0x409f77
test edi, edi
jle 0x409f07
mov eax, 0x600
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040d603
leave
ret 0x10
cmp edi, 0xffffff96
mov eax, 0x5000000
mov ecx, 0x1000
cmove eax, ecx
jmp 0x409ef6
cmp dword [esi + 4], 0xffffffff
je 0x409f27
push dword [esi]
call fcn.0040c830
pop ecx
mov eax, dword [esi]
or dword [esi + 4], 0xffffffff
mov ebx, dword [ebp + 8]
cmp ebx, dword [eax + 4]
jl 0x409f3c
mov eax, 0x10000
jmp 0x409ef6
cmp ebx, dword [eax + 0x10]
jge 0x409f50
push eax
call fcn.0040c892
jmp 0x409f4f
push eax
call fcn.0040c8d1
pop ecx
mov eax, dword [esi]
cmp dword [eax + 0x10], ebx
jl 0x409f49
lea eax, [ebp - 0x338]
mov ecx, esi
push eax
push ebx
call fcn.00409783
xor edx, edx
inc edx
test byte [ebp - 0x230], 0x10
je 0x409fb7
cmp dword [ebp + 0x14], edx
jne 0x409f7e
xor eax, eax
jmp 0x409ef6
mov al, byte [edi]
cmp al, 0x2f
je 0x409f9f
cmp al, 0x5c
je 0x409f9f
test al, al
je 0x409f92
cmp byte [edi + 1], 0x3a
je 0x409f9f
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.004095a2
pop ecx
pop ecx
jmp 0x409f77
xor ebx, ebx
cmp dword [ebp + 0x14], edx
je 0x40a0b3
mov cl, byte [edi]
mov eax, edi
mov dword [ebp - 0x340], edi
jmp 0x409fe4
cmp cl, 0x2f
je 0x409fdb
cmp byte [eax], 0x5c
je 0x409fdb
inc eax
jmp 0x409fe2
inc eax
mov dword [ebp - 0x340], eax
mov cl, byte [eax]
test cl, cl
jne 0x409fce
push edi
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.00411293
mov ecx, dword [ebp - 0x340]
add esp, 0xc
cmp ecx, edi
jne 0x40a00f
mov byte [ebp - 0x108], bl
jmp 0x40a040
mov eax, ecx
sub eax, edi
cmp eax, 0x104
jae 0x40a190
mov byte [ebp + eax - 0x108], bl
mov al, byte [ebp - 0x108]
cmp al, 0x2f
je 0x40a066
cmp al, 0x5c
je 0x40a066
test al, al
je 0x40a040
cmp byte [ebp - 0x107], 0x3a
je 0x40a066
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 0x40a085
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.004095a2
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 0x40a0c2
mov eax, 0x200
jmp 0x409ef6
push dword [esi + 0x138]
push dword [esi]
call fcn.0040c9dc
pop ecx
pop ecx
cmp dword [esi + 0x13c], ebx
jne 0x40a0ea
push 0x4000
call fcn.0040dd2b
pop ecx
mov dword [esi + 0x13c], eax
lea eax, [ebp - 0x339]
push eax
push 0x4000
push dword [esi + 0x13c]
push dword [esi]
call fcn.0040cc8d
add esp, 0x10
mov dword [ebp - 0x340], eax
cmp eax, 0xffffff96
je 0x40a16f
test eax, eax
js 0x40a143
jle 0x40a137
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 0x40a14a
mov eax, dword [ebp - 0x340]
cmp byte [ebp - 0x339], bl
jne 0x40a151
test eax, eax
jne 0x40a0ea
mov ebx, 0x5000000
jmp 0x40a174
mov ebx, 0x400
jmp 0x40a174
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 0x40a174
mov ebx, 0x1000
cmp dword [ebp + 0x14], 1
je 0x40a181
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esi]
call fcn.0040c830
pop ecx
mov eax, ebx
jmp 0x409ef6
call fcn.0040dc4e
int3