Function at 0x401000
Capabilities:
Accept command line arguments
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe0
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov ecx, 0x100
cld
mov al, 0
repne scasb al, byte es:[edi]
sub edi, 2
push edi
mov ecx, 0x100
mov al, 0x3a
std
repne scasb al, byte es:[edi]
mov esi, edi
pop ecx
sub ecx, edi
mov edi, section..data
cld
rep movsb byte es:[edi], byte [esi]
mov byte [edi], 0
sub edi, 4
push edi
mov eax, dword [edi]
mov dword [0x403100], eax
cmp dword [edi], 0x777a6c2e
jne 0x401051
mov dword [ebp - 0x1c], 0
jmp 0x401058
mov dword [ebp - 0x1c], 1
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push section..data
call sub.kernel32.dll_CreateFileA
cmp eax, 0xffffffff
jne 0x40107e
jmp 0x4011b2
mov dword [ebp - 4], eax
push 0
push dword [ebp - 4]
call sub.kernel32.dll_GetFileSize
mov dword [ebp - 0x14], eax
push 4
push 0x1000
push eax
push 0
call sub.kernel32.dll_VirtualAlloc
mov dword [ebp - 8], eax
push 0
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x14]
push dword [ebp - 8]
push dword [ebp - 4]
call sub.kernel32.dll_ReadFile
push dword [ebp - 4]
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
shl eax, 2
push 4
push 0x1000
push eax
push 0
call sub.kernel32.dll_VirtualAlloc
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x1c], 1
jne 0x401132
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push dword [ebp - 8]
call 0x4011b9
mov dword [ebp - 0x14], eax
pop edi
mov eax, dword [edi]
mov dword [ebp - 0x20], eax
mov dword [edi], 0x777a6c2e
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
push section..data
call sub.kernel32.dll_CreateFileA
mov dword [ebp - 0xc], eax
push 0
lea eax, [ebp - 0x18]
push eax
push 4
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0xc]
call sub.kernel32.dll_WriteFile
jmp 0x401178
mov edi, dword [ebp - 8]
mov eax, dword [edi]
mov dword [ebp - 0x20], eax
add dword [ebp - 8], 4
mov edi, dword [ebp - 0x14]
sub edi, 4
push edi
push dword [ebp - 0x10]
push dword [ebp - 8]
call fcn.0040123f
mov dword [ebp - 0x14], eax
pop edi
mov eax, dword [ebp - 0x20]
mov dword [edi], eax
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
push section..data
call sub.kernel32.dll_CreateFileA
mov dword [ebp - 0xc], eax
push 0
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push dword [ebp - 0xc]
call sub.kernel32.dll_WriteFile
push dword [ebp - 0xc]
call sub.kernel32.dll_CloseHandle
push 0x8000
push 0
push dword [ebp - 8]
call sub.kernel32.dll_VirtualFree
push 0x8000
push 0
push dword [ebp - 0x10]
call sub.kernel32.dll_VirtualFree
push 0
call sub.kernel32.dll_ExitProcess
push ebp
mov ebp, esp
add esp, 0xfffffffc
push 4
push 0x1000
push 0x3fffc
push 0
call sub.kernel32.dll_VirtualAlloc
mov edx, eax
mov esi, dword [ebp + 8]
add dword [ebp + 0x10], esi
mov edi, dword [ebp + 0xc]
mov ecx, 0x100
mov ebx, ecx
shl ebx, 2
add ebx, edx
sub ebx, 4
xor eax, eax
cld
lodsb al, byte [esi]
shl eax, 0x10
lodsb al, byte [esi]
push edi
push ecx
mov edi, ebx
std
repne scasd eax, dword es:[edi]
cld
cmp ecx, 0xff
jbe 0x40120a
mov eax, ecx
pop ecx
pop edi
jmp 0x401222
pop ecx
cmp ecx, 0xffff
je 0x40121a
mov dword [edx + ecx*4], eax
add ebx, 4
inc ecx
pop edi
push eax
shr eax, 0x10
stosw word es:[edi], ax
pop eax
cmp esi, dword [ebp + 0x10]
jne 0x4011f0
stosw word es:[edi], ax
sub edi, dword [ebp + 0xc]
push edi
push 0x8000
push 0
push edx
call sub.kernel32.dll_VirtualFree
pop eax
leave
ret 0xc