Function at 0x4049e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x344
mov eax, dword [0x4716e0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 8]
test edi, edi
jne 0x404a20
mov ebx, 0x10000
pop edi
mov eax, ebx
mov dword [0x473d30], 0x10000
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004163f4
mov esp, ebp
pop ebp
ret
cmp dword [edi], 1
je 0x404a46
mov ebx, 0x80000
pop edi
mov eax, ebx
mov dword [0x473d30], 0x80000
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004163f4
mov esp, ebp
pop ebp
ret
mov edi, dword [edi + 4]
cmp dword [edi + 4], 0xffffffff
je 0x404a59
push dword [edi]
call fcn.00407560
add esp, 4
mov eax, dword [edi]
mov ecx, dword [ebp + 0xc]
mov dword [edi + 4], 0xffffffff
cmp ecx, dword [eax + 4]
jl 0x404a74
mov ebx, 0x10000
jmp 0x404d23
cmp ecx, dword [eax + 0x10]
jge 0x404a85
push eax
call fcn.004075f0
mov ecx, dword [ebp + 0xc]
add esp, 4
mov eax, dword [edi]
push esi
cmp dword [eax + 0x10], ecx
jge 0x404ae8
lea ecx, [ecx]
mov esi, dword [edi]
test esi, esi
je 0x404ae1
cmp dword [esi + 0x18], 0
je 0x404ae1
mov edx, dword [esi + 0x10]
inc edx
cmp edx, dword [esi + 4]
je 0x404ae1
mov ecx, dword [esi + 0x50]
mov eax, dword [esi + 0x48]
add ecx, dword [esi + 0x4c]
push 0
push 0
push 0
add eax, 0x2e
push 0
add eax, ecx
add dword [esi + 0x14], eax
push 0
push 0
lea eax, [esi + 0x78]
push eax
lea eax, [esi + 0x28]
push eax
push esi
mov dword [esi + 0x10], edx
call fcn.00407f00
mov ecx, dword [ebp + 0xc]
add esp, 0x24
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov eax, dword [edi]
cmp dword [eax + 0x10], ecx
jl 0x404a90
lea eax, [ebp - 0x33c]
push eax
push ecx
mov ecx, edi
call fcn.004040b0
test byte [ebp - 0x234], 0x10
mov al, byte [ebx]
je 0x404b3d
cmp al, 0x2f
je 0x404b2b
cmp al, 0x5c
je 0x404b2b
test al, al
je 0x404b14
cmp byte [ebx + 1], 0x3a
je 0x404b2b
lea eax, [edi + 0x140]
push ebx
push eax
call fcn.00403fb0
add esp, 8
xor ebx, ebx
jmp 0x404d22
push ebx
push 0
call fcn.00403fb0
add esp, 8
xor ebx, ebx
jmp 0x404d22
mov esi, ebx
mov dword [ebp - 0x344], ebx
mov ecx, ebx
test al, al
je 0x404b69
jmp 0x404b50
cmp al, 0x2f
je 0x404b58
cmp al, 0x5c
jne 0x404b5b
lea esi, [ecx + 1]
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x404b50
mov dword [ebp - 0x344], esi
push ebx
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.00416f30
add esp, 0xc
cmp esi, ebx
jne 0x404b8b
mov byte [ebp - 0x108], 0
jmp 0x404bbd
mov eax, esi
sub eax, ebx
cmp eax, 0x104
jae 0x404d3b
mov byte [ebp + eax - 0x108], 0
mov al, byte [ebp - 0x108]
cmp al, 0x2f
je 0x404bf4
cmp al, 0x5c
je 0x404bf4
test al, al
je 0x404bbd
cmp byte [ebp - 0x107], 0x3a
je 0x404bf4
push dword [ebp - 0x344]
lea eax, [ebp - 0x108]
push eax
lea esi, [edi + 0x140]
push esi
lea eax, [ebp - 0x20c]
push str._s_s_s
push eax
call fcn.00402c50
lea eax, [ebp - 0x108]
push eax
push esi
call fcn.00403fb0
add esp, 0x1c
jmp 0x404c1e
push esi
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x20c]
push str._s_s
push eax
call fcn.00402c50
lea eax, [ebp - 0x108]
push eax
push 0
call fcn.00403fb0
add esp, 0x18
push 0
push dword [ebp - 0x234]
lea eax, [ebp - 0x20c]
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x344], eax
cmp eax, 0xffffffff
jne 0x404c53
mov ebx, 0x200
jmp 0x404d22
push dword [edi + 0x138]
push dword [edi]
call fcn.004076b0
add esp, 8
cmp dword [edi + 0x13c], 0
jne 0x404c7f
push 0x4000
call fcn.00414a3b
add esp, 4
mov dword [edi + 0x13c], eax
xor ebx, ebx
lea eax, [ebp - 0x33d]
push eax
push 0x4000
push dword [edi + 0x13c]
push dword [edi]
call fcn.004079e0
mov esi, eax
add esp, 0x10
cmp esi, 0xffffff96
je 0x404d07
test esi, esi
js 0x404cd6
jle 0x404cca
push 0
lea eax, [ebp - 0x210]
push eax
push esi
push dword [edi + 0x13c]
push dword [ebp - 0x344]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x404cdd
cmp byte [ebp - 0x33d], bl
jne 0x404ce4
test esi, esi
jne 0x404c81
mov ebx, 0x5000000
jmp 0x404d0c
mov ebx, 0x400
jmp 0x404d0c
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x228]
push eax
push dword [ebp - 0x344]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
jmp 0x404d0c
mov ebx, 0x1000
push dword [ebp - 0x344]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [edi]
call fcn.00407560
add esp, 4
pop esi
mov ecx, dword [ebp - 4]
pop edi
mov dword [0x473d30], ebx
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.004163f4
mov esp, ebp
pop ebp
ret
call fcn.004159a2
int3