Function at 0x401080
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc0c
push ebx
push esi
push edi
xor ebx, ebx
push 0x3fe
mov edi, eax
lea eax, [esp + 0x41e]
push ebx
push eax
mov word [esp + 0x424], bx
call sub.MSVCR80.dll_memset
push 0x1ff
lea ecx, [esp + 0x29]
push ebx
push ecx
mov byte [esp + 0x30], bl
call sub.MSVCR80.dll_memset
push 0x1ff
lea edx, [esp + 0x235]
push ebx
push edx
mov byte [esp + 0x23c], bl
call sub.MSVCR80.dll_memset
push 0x3fe
lea eax, [esp + 0x842]
push ebx
push eax
mov word [esp + 0x848], bx
call sub.MSVCR80.dll_memset
mov esi, dword [sym.imp.MSVCR80.dll_fopen]
push 0x4032e8
push edi
call esi
add esp, 0x38
cmp eax, ebx
mov dword [esp + 0x10], eax
jne 0x401127
push 0x4032ec
push edi
call esi
add esp, 8
cmp eax, ebx
mov dword [esp + 0x10], eax
je 0x401322
mov ecx, dword [ebp + 8]
push 0x4032f0
push ecx
call esi
mov esi, eax
add esp, 8
cmp esi, ebx
mov dword [esp + 0x14], esi
je 0x401322
push 0x200
lea edx, [esp + 0x41c]
push ebx
push edx
call sub.MSVCR80.dll_memset
push 0x200
lea eax, [esp + 0x28]
push ebx
push eax
call sub.MSVCR80.dll_memset
mov edi, dword [esp + 0x28]
push edi
lea ecx, [esp + 0x434]
push 0x1fe
push ecx
call dword [sym.imp.MSVCR80.dll_fgetws]
add esp, 0x24
test eax, eax
je 0x401313
lea esp, [esp]
mov al, byte [esp + 0x418]
cmp al, 0xff
je 0x4012c5
cmp al, 0xd
je 0x4012c5
push ebx
push ebx
push 0x1fe
lea edx, [esp + 0x24]
push edx
push 0xffffffffffffffff
lea eax, [esp + 0x42c]
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea ecx, [esp + 0x18]
push str.Wow6432Node
push ecx
call dword [sym.imp.MSVCR80.dll_strstr]
push 0x200
lea edx, [esp + 0x224]
push ebx
push edx
mov esi, eax
call sub.MSVCR80.dll_memset
add esp, 0x14
cmp esi, ebx
je 0x401213
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x4011f6
sub eax, edx
add eax, 0xfffffff5
push eax
lea eax, [esi + 0xc]
push eax
push esi
call dword [sym.imp.MSVCR80.dll_memmove]
add esp, 0xc
mov ecx, 0x80
lea esi, [esp + 0x18]
lea edi, [esp + 0x218]
push 0x200
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x81c]
push ebx
push ecx
call sub.MSVCR80.dll_memset
lea eax, [esp + 0x224]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x401245
push 0x1fe
sub eax, edx
lea edx, [esp + 0x81c]
push edx
add eax, 1
push eax
lea eax, [esp + 0x224]
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [esp + 0x818]
lea edx, [eax + 2]
jmp 0x401280
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x401280
mov ecx, dword [esp + 0x14]
sub eax, edx
push ecx
sar eax, 1
push eax
lea edx, [esp + 0x820]
push 2
push edx
call dword [sym.imp.MSVCR80.dll_fwrite]
push 0x200
lea eax, [esp + 0x42c]
push ebx
push eax
call sub.MSVCR80.dll_memset
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x2c]
add esp, 0x1c
jmp 0x4012f4
lea eax, [esp + 0x418]
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4012d0
sub eax, edx
push esi
sar eax, 1
push eax
lea ecx, [esp + 0x420]
push 2
push ecx
call dword [sym.imp.MSVCR80.dll_fwrite]
add esp, 0x10
push edi
lea edx, [esp + 0x41c]
push 0x1fe
push edx
call dword [sym.imp.MSVCR80.dll_fgetws]
add esp, 0xc
test eax, eax
jne 0x401190
push esi
mov esi, dword [sym.imp.MSVCR80.dll_fclose]
call esi
push edi
call esi
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret