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

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffff5
call sub.KERNEL32.dll_GetStdHandle
mov dword [0x503588], eax
call sub.KERNEL32.dll_GetCommandLineA
mov esi, eax
lodsb al, byte [esi]
test al, al
je 0x4011df
cmp al, 0x22
jne 0x401033
lodsb al, byte [esi]
test al, al
je 0x4011df
cmp al, 0x22
jne 0x401023
inc esi
jmp 0x401041
cmp al, 0x20
je 0x401041
test al, al
je 0x4011df
jmp 0x401016
lodsb al, byte [esi]
test al, al
je 0x4011df
cmp al, 0x20
je 0x401041
dec esi
mov edi, 0x403080
lodsb al, byte [esi]
test al, al
je 0x401060
cmp al, 0x20
je 0x401060
stosb byte es:[edi], al
jmp 0x401054
mov byte [edi], 0
cmp byte [0x403080], 0
je 0x4011df
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push 0x403080
call sub.KERNEL32.dll_CreateFileA
cmp eax, 0xffffffff
je 0x4011ff
mov dword [0x503584], eax
push 0
push 0x503594
push 7
push 0x50358c
push dword [0x503584]
call sub.KERNEL32.dll_ReadFile
mov esi, 0x50358c
mov edi, 0x403067
mov ecx, 7
repe cmpsb byte [esi], byte es:[edi]
je 0x40113d
push 0
push 0
push 0
push dword [0x503584]
call sub.KERNEL32.dll_SetFilePointer
push 0
push 0x503594
push 3
push 0x50358c
push dword [0x503584]
call sub.KERNEL32.dll_ReadFile
mov esi, 0x50358c
mov edi, 0x40306f
mov ecx, 3
repe cmpsb byte [esi], byte es:[edi]
je 0x401146
mov esi, 0x403080
call fcn.004011a9
test eax, eax
je 0x401123
mov esi, 0x50359d
mov al, 0x64
cmp byte [esi], al
jne 0x401123
mov al, 0x32
cmp byte [esi + 1], al
je 0x40114f
push 0
push 0
push 0
push dword [0x503584]
call sub.KERNEL32.dll_SetFilePointer
mov byte [0x50359c], 3
jmp 0x401158
mov byte [0x50359c], 1
jmp 0x401158
mov byte [0x50359c], 2
jmp 0x401158
mov byte [0x50359c], 4
jmp 0x401158
push 0
push 0
push 0
push dword [0x503584]
call sub.KERNEL32.dll_SetFilePointer
movzx eax, byte [0x50359c]
cmp al, 1
je 0x401241
cmp al, 2
je 0x401441
cmp al, 3
je 0x4016a7
cmp al, 4
je 0x4019c2
jmp 0x4011cc
push dword [0x503584]
call sub.KERNEL32.dll_CloseHandle
xor eax, eax
push eax
call sub.KERNEL32.dll_ExitProcess
push 0
push 0x503598
push 0x1c
push str.Usage:_unarchive__archive__r_nInvalid_archive_format_r_nInvalid_BAR__r_nFailed_to_open_file:__r_nExtracting:__r_nMASMAR0
push dword [0x503588]
call sub.KERNEL32.dll_WriteFile
push 1
call sub.KERNEL32.dll_ExitProcess
push 0
push 0x503598
push 0x17
push 0x403042
push dword [0x503588]
call sub.KERNEL32.dll_WriteFile
mov esi, 0x403080
call fcn.00401192
push 0
push 0x503598
push eax
push 0x403080
push dword [0x503588]
call sub.KERNEL32.dll_WriteFile
push 1
call sub.KERNEL32.dll_ExitProcess
push ebp
mov ebp, esp
push 1
push 0
push 0
push dword [0x503584]
call sub.KERNEL32.dll_SetFilePointer
push 0
push 0x503594
push 1
push 0x5035ab
push dword [0x503584]
call sub.KERNEL32.dll_ReadFile
test eax, eax
je 0x4012db
mov al, byte [0x5035ab]
cmp al, byte [0x40307d]
je 0x4012db
mov edi, 0x5035ac
push 0
push 0x503594
push 1
push edi
push dword [0x503584]
call sub.KERNEL32.dll_ReadFile
test eax, eax
je 0x4012db
mov al, byte [edi]
test al, al
je 0x4012a6
inc edi
jmp 0x401284
mov al, byte [0x5035ab]
cmp al, 1
jne 0x401255
push 0
push 0x503594
push 4
push 0x5036b0
push dword [0x503584]
call sub.KERNEL32.dll_ReadFile
test eax, eax
je 0x4012db
call fcn.004012e3
call fcn.0040134f
jmp 0x401255
mov esp, ebp
pop ebp
jmp 0x4011cc
push ebp
mov ebp, esp
push 0
push 0
push 0
push dword [0x503584]
call sub.KERNEL32.dll_SetFilePointer
push 1
push 0
push 4
push dword [0x503584]
call sub.KERNEL32.dll_SetFilePointer
push 0
push 0x503594
push 4
push 0x5036b4
push dword [0x503584]
call sub.KERNEL32.dll_ReadFile
test eax, eax
je 0x40153a
mov ecx, dword [0x5036b4]
test ecx, ecx
je 0x40153a
push ecx
mov edi, 0x5036bc
mov ecx, 0x84
xor al, al
rep stosb byte es:[edi], al
pop ecx
push 0
push 0x503594
push 0x84
push 0x5036bc
push dword [0x503584]
call sub.KERNEL32.dll_ReadFile
test eax, eax
je 0x40153a
push 0
push 0x503594
push 4
push 0x503740
push dword [0x503584]
call sub.KERNEL32.dll_ReadFile
test eax, eax
je 0x40153a
push 0
push 0x503594
push 4
push 0x5036b8
push dword [0x503584]
call sub.KERNEL32.dll_ReadFile
test eax, eax
je 0x40153a
push 0
push 0x503594
push 4
push 0x503740
push dword [0x503584]
call sub.KERNEL32.dll_ReadFile
test eax, eax
je 0x40153a
mov al, byte [0x5036bc]
test al, al
je 0x40152f
call fcn.00401542
call fcn.004015ba
dec dword [0x5036b4]
jmp 0x401487
mov esp, ebp
pop ebp
jmp 0x4011cc
push ebp
mov ebp, esp
push 0
push 0x503594
push 0xa
push 0x5035a1
push dword [0x503584]
call sub.KERNEL32.dll_ReadFile
test eax, eax
je 0x4011cc
push 0
push 0x503594
push 2
push 0x503748
push dword [0x503584]
call sub.KERNEL32.dll_ReadFile
test eax, eax
je 0x4011cc
movzx ecx, word [0x503748]
test ecx, ecx
je 0x4011cc
push 0
push 0x503594
push 0x100
push 0x503752
push dword [0x503584]
call sub.KERNEL32.dll_ReadFile
test eax, eax
je 0x4011cc
call fcn.00401783
push 0
push 0x503594
push 8
push 0x503952
push dword [0x503584]
call sub.KERNEL32.dll_ReadFile
call fcn.00401825
test eax, eax
je 0x4011cc
call fcn.00401866
call fcn.004018ca
test eax, eax
je 0x4011cc
dec word [0x503748]
jmp 0x4016ec
push ebp
mov ebp, esp
push 0
push 0x503594
push 4
push 0x503a5e
push dword [0x503584]
call sub.KERNEL32.dll_ReadFile
test eax, eax
je 0x401ada
push 1
push 0
push 4
push dword [0x503584]
call sub.KERNEL32.dll_SetFilePointer
mov eax, dword [0x503a5e]
mov dword [0x503a62], eax
mov eax, dword [0x503a62]
test eax, eax
je 0x401ada
push 0
push 0x503594
push 1
push 0x503a6e
push dword [0x503584]
call sub.KERNEL32.dll_ReadFile
test eax, eax
je 0x401ada
mov al, byte [0x503a6e]
cmp al, byte [0x40307e]
jne 0x401ada
push 0
push 0x503594
push 4
push 0x503a66
push dword [0x503584]
call sub.KERNEL32.dll_ReadFile
push 0
push 0x503594
push 4
push 0x503a6a
push dword [0x503584]
call sub.KERNEL32.dll_ReadFile
push 1
push 0
push 0x10
push dword [0x503584]
call sub.KERNEL32.dll_SetFilePointer
mov eax, dword [0x503a66]
push 0
push 0x503594
push eax
push 0x503a6f
push dword [0x503584]
call sub.KERNEL32.dll_ReadFile
mov edi, 0x503a6f
add edi, dword [0x503a66]
mov byte [edi], 0
mov esi, 0x503a6f
mov ecx, dword [0x503a66]
mov al, byte [esi]
cmp al, 0x5c
jne 0x401ac2
mov byte [esi], 0x2f
inc esi
loop 0x401ab9
call fcn.00401ae2
call fcn.00401b46
dec dword [0x503a62]
jmp 0x401a01
mov esp, ebp
pop ebp
jmp 0x4011cc