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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
push edi
cmp dword [0x41788c], 0
je 0x4098f8
mov eax, dword [0x417280]
mov ecx, dword [0x41788c]
lea edx, [ecx + eax - 4]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
cmp dword [eax], 0
jg 0x4098e5
mov dword [ebp - 0x18], 1
jmp 0x4098f0
mov ecx, dword [ebp - 4]
mov edx, dword [ecx]
sub edx, 1
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x18]
jmp 0x409ba6
call dword [sym.imp.KERNEL32.DLL_GetCommandLineA]
movsx eax, byte [eax]
cmp eax, 0x22
jne 0x409914
call dword [sym.imp.KERNEL32.DLL_GetCommandLineA]
add eax, 1
mov dword [ebp - 0x1c], eax
jmp 0x40991d
call dword [sym.imp.KERNEL32.DLL_GetCommandLineA]
mov dword [ebp - 0x1c], eax
mov edi, dword [ebp - 0x1c]
mov edx, 0x417388
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov eax, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0x22
push 0x417388
call sub.MSVCRT.dll_strchr
add esp, 8
test eax, eax
je 0x40996c
push 0x22
push 0x417388
call sub.MSVCRT.dll_strchr
add esp, 8
add eax, 1
mov dword [ebp - 0x20], eax
jmp 0x409973
mov dword [ebp - 0x20], 0x417388
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 8], ecx
push 0x20
mov edx, dword [ebp - 8]
push edx
call sub.MSVCRT.dll_strchr
add esp, 8
test eax, eax
je 0x40999c
push 0x20
mov eax, dword [ebp - 8]
push eax
call sub.MSVCRT.dll_strchr
add esp, 8
mov byte [eax], 0
push 0x22
push 0x417388
call sub.MSVCRT.dll_strchr
add esp, 8
test eax, eax
je 0x4099c1
push 0x22
push 0x417388
call sub.MSVCRT.dll_strchr
add esp, 8
mov byte [eax], 0
push str..com
push 0x417388
call sub.MSVCRT.dll_strstr
add esp, 8
test eax, eax
je 0x409a4c
push str..COM
push 0x417388
call sub.MSVCRT.dll_strstr
add esp, 8
test eax, eax
je 0x409a4c
push str..exe
push 0x417388
call sub.MSVCRT.dll_strstr
add esp, 8
test eax, eax
jne 0x409a4c
push str..EXE
push 0x417388
call sub.MSVCRT.dll_strstr
add esp, 8
test eax, eax
jne 0x409a4c
mov edi, str..exe
mov edx, 0x417388
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
add edi, 0xffffffff
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0x104
push 0x417388
push 0x417284
call sub.MSVCRT.dll__fullpath
add esp, 0xc
test eax, eax
jne 0x409a8e
mov edi, 0x417388
mov edx, 0x417284
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov eax, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0x40d1b0
push 0x417284
call sub.MSVCRT.dll_fopen
add esp, 8
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x409b61
push 2
push 0
mov ecx, dword [ebp - 0x14]
push ecx
call sub.MSVCRT.dll_fseek
add esp, 0xc
lea edx, [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x14]
push eax
call sub.MSVCRT.dll_fgetpos
add esp, 8
push 0
push 0
mov ecx, dword [ebp - 0x14]
push ecx
call sub.MSVCRT.dll_fseek
add esp, 0xc
mov edx, dword [ebp - 0x10]
push edx
call sub.MSVCRT.dll_malloc
add esp, 4
mov dword [0x41788c], eax
cmp dword [0x41788c], 0
je 0x409b43
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
push 1
mov edx, dword [0x41788c]
push edx
call sub.MSVCRT.dll_fread
add esp, 0x10
xor ecx, ecx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x28]
cmp edx, dword [ebp - 0x10]
jne 0x409b28
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0xc]
je 0x409b38
mov ecx, dword [ebp - 0x14]
push ecx
call sub.MSVCRT.dll_fclose
add esp, 4
xor eax, eax
jmp 0x409ba6
mov edx, dword [ebp - 0x10]
mov dword [0x417280], edx
jmp 0x409b53
mov eax, dword [ebp - 0x14]
push eax
call sub.MSVCRT.dll_fclose
add esp, 4
xor eax, eax
jmp 0x409ba6
mov ecx, dword [ebp - 0x14]
push ecx
call sub.MSVCRT.dll_fclose
add esp, 4
jmp 0x409b68
push 0
call sub.MSVCRT.dll_exit
mov edx, dword [0x417280]
mov eax, dword [0x41788c]
lea ecx, [eax + edx - 4]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx]
add eax, 1
mov ecx, dword [ebp - 4]
mov dword [ecx], eax
mov edx, dword [ebp - 4]
cmp dword [edx], 0
jg 0x409b98
mov dword [ebp - 0x2c], 1
jmp 0x409ba3
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
sub ecx, 1
mov dword [ebp - 0x2c], ecx
mov eax, dword [ebp - 0x2c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret