Function at 0x401030
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xf34
mov eax, dword [0xbbbac8]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 1
jle 0x4010c1
mov eax, 4
shl eax, 0
mov ecx, 1
imul edx, ecx, 0
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + eax]
movsx ecx, byte [eax + edx]
cmp ecx, 0x2d
jne 0x4010c1
mov edx, 4
shl edx, 0
mov eax, 1
shl eax, 0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + edx]
movsx eax, byte [edx + eax]
cmp eax, 0x2d
jne 0x4010c1
mov ecx, 4
shl ecx, 0
mov edx, 1
shl edx, 1
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + ecx]
movsx edx, byte [ecx + edx]
cmp edx, 0x73
jne 0x4010c1
mov eax, 4
shl eax, 0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + eax]
push edx
call fcn.00404ae0
add esp, 4
cmp eax, 0xb
je 0x4010c8
xor eax, eax
jmp 0x4013f2
mov dword [ebp - 0xf28], 0x24
push 0x200
push 0
lea eax, [ebp - 0x604]
push eax
call fcn.004020a0
add esp, 0xc
push 0x200
push 0
lea ecx, [ebp - 0x404]
push ecx
call fcn.004020a0
add esp, 0xc
push 0x200
push 0
lea edx, [ebp - 0x804]
push edx
call fcn.004020a0
add esp, 0xc
push 0x104
lea eax, [ebp - 0x908]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0xf20], eax
cmp dword [ebp - 0xf20], 0
je 0x40115a
push 0x200
lea ecx, [ebp - 0xb08]
push ecx
mov edx, dword [ebp - 0xf20]
push edx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
jmp 0x401164
mov eax, 0x3e7
jmp 0x4013f2
push 0xbbba64
call fcn.004048bd
add esp, 4
mov dword [ebp - 0xf18], eax
cmp dword [ebp - 0xf18], 0
je 0x401193
mov eax, dword [ebp - 0xf18]
push eax
call fcn.00404ae0
add esp, 4
test eax, eax
jne 0x40119d
mov eax, 0x3e7
jmp 0x4013f2
mov dword [ebp - 0xf0c], 0
jmp 0x4011b8
mov ecx, dword [ebp - 0xf0c]
add ecx, 1
mov dword [ebp - 0xf0c], ecx
cmp dword [ebp - 0xf0c], 0xd
jge 0x4011f4
mov edx, dword [ebp - 0xf0c]
movzx ecx, byte [edx + section..data]
mov eax, dword [ebp - 0xf0c]
xor edx, edx
div dword [ebp - 0xf28]
movzx edx, byte [edx + 0xbbba40]
xor ecx, edx
mov eax, dword [ebp - 0xf0c]
mov byte [ebp + eax - 0x604], cl
jmp 0x4011a9
mov ecx, 1
imul edx, ecx, 0xd
mov dword [ebp - 0xf24], edx
cmp dword [ebp - 0xf24], 0x200
jae 0x401210
jmp 0x401215
call fcn.004015d6
mov eax, dword [ebp - 0xf24]
mov byte [ebp + eax - 0x604], 0
push 0xbbba6c
mov ecx, dword [ebp - 0xf18]
push ecx
push 0xbbba74
lea edx, [ebp - 0x204]
push edx
call fcn.00401480
add esp, 0x10
push 0xbbba7c
lea eax, [ebp - 0x204]
push eax
call fcn.00402f79
add esp, 8
mov dword [ebp - 0xf30], eax
mov dword [ebp - 0xf1c], 0x79fa3d
mov ecx, dword [ebp - 0xf1c]
push ecx
call fcn.004046a0
add esp, 4
mov dword [ebp - 0xf2c], eax
mov dword [ebp - 0xf10], 0
jmp 0x401297
mov edx, dword [ebp - 0xf10]
add edx, 1
mov dword [ebp - 0xf10], edx
mov eax, dword [ebp - 0xf1c]
sub eax, 0xd
cmp dword [ebp - 0xf10], eax
jae 0x4012dc
mov ecx, dword [ebp - 0xf10]
movzx ecx, byte [ecx + 0x41c00d]
mov eax, dword [ebp - 0xf10]
xor edx, edx
div dword [ebp - 0xf28]
movzx edx, byte [edx + 0xbbba40]
xor ecx, edx
mov eax, dword [ebp - 0xf2c]
add eax, dword [ebp - 0xf10]
mov byte [eax], cl
jmp 0x401288
mov ecx, dword [ebp - 0xf30]
push ecx
push 1
mov edx, dword [ebp - 0xf1c]
sub edx, 0xd
push edx
mov eax, dword [ebp - 0xf2c]
push eax
call fcn.004031af
add esp, 0x10
mov ecx, dword [ebp - 0xf30]
push ecx
call fcn.00402e3e
add esp, 4
lea edx, [ebp - 0x204]
push edx
push 0xbbba80
lea eax, [ebp - 0xf08]
push eax
call fcn.00401480
add esp, 0xc
lea ecx, [ebp - 0xf08]
push ecx
call fcn.004049c6
add esp, 4
mov dword [ebp - 0xf14], 1
jmp 0x401352
mov edx, dword [ebp - 0xf14]
add edx, 1
mov dword [ebp - 0xf14], edx
mov eax, dword [ebp - 0xf14]
cmp eax, dword [ebp + 8]
jge 0x40139d
mov ecx, dword [ebp - 0xf14]
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + ecx*4]
push eax
lea ecx, [ebp - 0x404]
push ecx
call fcn.004049f0
add esp, 8
mov edx, dword [ebp + 8]
sub edx, 1
cmp dword [ebp - 0xf14], edx
jge 0x40139b
push 0xbbbac0
lea eax, [ebp - 0x404]
push eax
call fcn.004049f0
add esp, 8
jmp 0x401343
lea ecx, [ebp - 0x204]
push ecx
lea edx, [ebp - 0x404]
push edx
lea eax, [ebp - 0x204]
push eax
lea ecx, [ebp - 0x604]
push ecx
lea edx, [ebp - 0x804]
push edx
call fcn.00401480
add esp, 0x14
lea eax, [ebp - 0x804]
push eax
call fcn.004049c6
add esp, 4
mov dword [ebp - 0xf34], eax
lea ecx, [ebp - 0x204]
push ecx
call fcn.00403401
add esp, 4
mov eax, dword [ebp - 0xf34]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004016b2
mov esp, ebp
pop ebp
ret