Function at 0x401150
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov eax, 0x2010
lea ebp, [esp - 0x1f90]
call fcn.00402950
mov eax, dword [0x404038]
push ebx
mov ebx, dword [ebp + 0x1f98]
push esi
mov esi, dword [ebp + 0x1fa0]
push edi
push 0xa
push esi
mov dword [ebp + 0x1f8c], eax
mov dword [ebp - 0x7c], ebx
call dword [sym.imp.MSVCR71.dll_wcschr]
add esp, 8
test eax, eax
mov dword [ebp - 0x80], eax
jne 0x401250
push esi
call dword [sym.imp.MSVCR71.dll_wcslen]
mov edi, eax
mov eax, dword [ebp + 0x1f9c]
add esp, 4
shl edi, 1
test eax, eax
je 0x4011ea
mov eax, dword [0x404648]
push 0
push 0
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea ecx, [ebp - 0x78]
push ecx
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [0x404644]
mov edx, dword [ebp - 0x78]
add eax, edx
mov dword [0x404644], eax
add dword [0x404648], edi
jmp 0x401388
lea eax, [edi + 1]
add eax, 3
and eax, 0xfffffffc
call fcn.00402950
mov ebx, esp
push 0
push 0
push edi
push ebx
mov eax, edi
shr eax, 1
push eax
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edx, dword [ebp - 0x7c]
push 0
lea ecx, [ebp - 0x78]
push ecx
push eax
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x78]
mov ecx, dword [0x404644]
add ecx, eax
mov eax, dword [0x404648]
add eax, edi
mov dword [0x404644], ecx
mov dword [0x404648], eax
jmp 0x401388
mov eax, dword [ebp - 0x80]
lea esp, [esp]
mov ebx, eax
sub ebx, esi
sar ebx, 1
shl ebx, 1
mov ecx, ebx
mov edx, ecx
shr ecx, 2
lea edi, [ebp - 0x74]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp + 0x1f9c]
mov eax, ebx
add ebx, 2
mov ecx, ebx
shr eax, 1
shr ecx, 1
add ebx, 2
test edi, edi
mov word [ebp + eax*2 - 0x74], 0xd
mov word [ebp + ecx*2 - 0x74], 0xa
je 0x4012b4
mov edx, dword [0x404648]
mov esi, dword [ebp - 0x7c]
push 0
push 0
push edx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x78]
push eax
push ebx
lea ecx, [ebp - 0x74]
push ecx
push esi
jmp 0x4012ec
lea eax, [ebx + 1]
add eax, 3
and eax, 0xfffffffc
call fcn.00402950
mov esi, esp
push 0
push 0
push ebx
push esi
shr ebx, 1
push ebx
lea edx, [ebp - 0x74]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edx, dword [ebp - 0x7c]
push 0
lea ecx, [ebp - 0x78]
push ecx
push eax
push esi
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [0x404644]
mov eax, dword [ebp - 0x78]
mov esi, dword [ebp - 0x80]
add ecx, eax
mov dword [0x404644], ecx
mov ecx, dword [0x404648]
add ecx, eax
add esi, 2
push 0xa
push esi
mov dword [0x404648], ecx
call dword [sym.imp.MSVCR71.dll_wcschr]
add esp, 8
test eax, eax
mov dword [ebp - 0x80], eax
jne 0x401249
cmp word [esi], ax
je 0x401388
push esi
call dword [sym.imp.MSVCR71.dll_wcslen]
mov ebx, eax
add esp, 4
shl ebx, 1
test edi, edi
je 0x401377
mov eax, dword [0x404648]
mov edi, dword [ebp - 0x7c]
push 0
push 0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea ecx, [ebp - 0x78]
push ecx
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [0x404644]
mov edx, dword [ebp - 0x78]
add eax, edx
mov dword [0x404644], eax
mov ecx, dword [0x404648]
mov eax, dword [ebp - 0x78]
add ecx, eax
mov dword [0x404648], ecx
cmp dword [0x404644], 0xfff
jbe 0x4013a8
mov ecx, dword [ebp - 0x7c]
push ecx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov dword [0x404644], 0
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x1f8c]
call fcn.00402931
pop edi
pop esi
pop ebx
add ebp, 0x1f90
mov esp, ebp
pop ebp
ret