Function at 0x401830
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
push esi
push edi
mov dword [ebp - 0x34], ecx
push str.CreateFileA
mov eax, dword [0x406504]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 4], eax
push str.WriteFile
mov ecx, dword [0x406504]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], 1
mov dword [ebp - 0x10], 0
push 0
push 0
push 2
push 0
push 1
push 0x40000000
mov edx, dword [ebp + 8]
push edx
call dword [ebp - 4]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
jne 0x401899
xor eax, eax
jmp 0x401a4b
cmp dword [ebp + 0x14], 1
jne 0x4018bf
push 0
lea eax, [ebp - 0x10]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 0x14]
push eax
call dword [ebp - 0xc]
test eax, eax
jne 0x4018bf
mov dword [ebp - 8], 0
cmp dword [ebp + 0x14], 1
je 0x401a3c
mov dword [ebp - 0x24], 0
jmp 0x4018db
mov ecx, dword [ebp - 0x24]
add ecx, 1
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x24]
cmp edx, dword [ebp + 0x10]
jge 0x401929
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [ebp - 0x24]
and eax, 0x80000001
jns 0x4018fb
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
je 0x401914
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0x24]
mov dl, byte [ecx]
sub dl, 0xb
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 0x24]
mov byte [eax], dl
jmp 0x401927
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0x24]
mov dl, byte [ecx]
add dl, 0x2e
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 0x24]
mov byte [eax], dl
jmp 0x4018d2
push 0
mov ecx, dword [ebp + 0x10]
push ecx
push str.o_8_
mov edx, dword [ebp + 0xc]
push edx
mov ecx, dword [ebp - 0x34]
call fcn.004016a0
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0xffffffff
jne 0x401950
xor eax, eax
jmp 0x401a4b
push 0
lea eax, [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x401973
xor eax, eax
jmp 0x401a4b
mov dword [ebp - 0x28], 0x3200000
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.004043ab
add esp, 4
mov dword [ebp - 0x30], eax
mov edx, dword [ebp - 0x30]
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x18], 2
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor edx, edx
mov ecx, 0x400
div ecx
add edx, 0x400
mov dword [ebp - 0x1c], edx
jmp 0x4019be
mov edx, dword [ebp - 0x18]
shl edx, 1
mov eax, dword [ebp - 0x1c]
lea ecx, [eax + edx*8]
mov dword [ebp - 0x1c], ecx
cmp dword [ebp - 0x1c], 0x2000
jae 0x4019f5
mov eax, dword [ebp - 0x1c]
xor edx, edx
mov ecx, 0xff
div ecx
mov eax, dword [ebp - 0x2c]
add eax, dword [ebp - 0x1c]
mov byte [eax], dl
mov eax, dword [ebp - 0x1c]
add eax, 3
xor edx, edx
mov ecx, 0xff
div ecx
mov eax, dword [ebp - 0x2c]
add eax, dword [ebp - 0x1c]
mov byte [eax + 5], dl
jmp 0x4019b0
push 0
lea ecx, [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0x28]
push edx
mov eax, dword [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call dword [ebp - 0xc]
test eax, eax
jne 0x401a12
xor eax, eax
jmp 0x401a4b
push 0
lea edx, [ebp - 0x10]
push edx
mov eax, dword [ebp + 0x10]
sub eax, dword [ebp - 0x20]
sub eax, 4
push eax
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp + 0xc]
lea eax, [edx + ecx + 4]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call dword [ebp - 0xc]
test eax, eax
jne 0x401a3c
xor eax, eax
jmp 0x401a4b
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10