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

Disassembly:
push rbp
push r15
sub rsp, 0x88
xor ebp, ebp
lea rcx, [0x1400016b4]
mov qword [rsp + 0x60], rbp
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__set_invalid_parameter_handler]
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov rcx, rax
lea rdx, [rsp + 0x44]
call qword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov ecx, dword [rsp + 0x44]
mov r15, rax
mov qword [rsp + 0x48], rax
cmp ecx, 0xa
jl 0x14000144b
mov qword [rsp + 0xa0], rbx
lea edx, [rbp + 8]
mov qword [rsp + 0xa8], rsi
inc ecx
mov qword [rsp + 0xb0], rdi
mov qword [rsp + 0x80], r12
mov qword [rsp + 0x78], r13
movsxd rcx, ecx
mov qword [rsp + 0x70], r14
call sub.glib_2.0_0.dll_g_malloc_n
lea rbx, [rbp - 1]
mov r14, rax
mov esi, ebp
cmp dword [rsp + 0x44], ebp
jle 0x1400010c5
mov rdi, rax
sub r15, rax
nop dword [rax]
nop dword [rax + rax]
mov rcx, qword [r15 + rdi]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rbp
mov edx, ebx
call sub.glib_2.0_0.dll_g_utf16_to_utf8
mov qword [rdi], rax
lea rdi, [rdi + 8]
inc esi
cmp esi, dword [rsp + 0x44]
jl 0x1400010a0
movsxd rax, esi
mov qword [r14 + rax*8], rbp
mov rcx, qword [r14 + 8]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov rcx, qword [r14 + 8]
mov r15d, eax
nop dword [rax]
cmp byte [rcx + rbx + 1], bpl
lea rbx, [rbx + 1]
jne 0x1400010e0
cmp byte [rbx + rcx - 1], 0x23
mov r13d, ebp
mov rcx, qword [r14 + 0x10]
sete r13b
add r13d, 0xa
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov rcx, qword [r14 + 0x18]
mov r12d, eax
movzx eax, byte [rcx]
cmp al, 0x2d
je 0x140001146
cmp al, 0x7a
jne 0x140001128
xor edx, edx
lea rcx, str.NUL:
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__open]
jmp 0x14000112e
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov ebx, eax
test eax, eax
je 0x140001146
xor edx, edx
mov ecx, eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__dup2]
mov ecx, ebx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__close]
mov rcx, qword [r14 + 0x20]
movzx eax, byte [rcx]
cmp al, 0x2d
je 0x14000118b
cmp al, 0x7a
jne 0x140001169
mov edx, 1
lea rcx, str.NUL:
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__open]
jmp 0x14000116f
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov ebx, eax
cmp eax, 1
je 0x14000118b
mov edx, 1
mov ecx, eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__dup2]
mov ecx, ebx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__close]
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__dup]
mov esi, eax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov ecx, esi
mov rdi, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__get_osfhandle]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [rsp + 0x30], 2
lea r9, [rsp + 0x58]
mov rcx, rax
mov dword [rsp + 0x28], ebp
mov r8, rdi
mov dword [rsp + 0x20], ebp
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
mov ecx, esi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__close]
mov rcx, qword [rsp + 0x58]
mov edx, 0x81
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__open_osfhandle]
mov rcx, qword [r14 + 0x28]
mov esi, eax
movzx eax, byte [rcx]
cmp al, 0x2d
je 0x140001235
cmp al, 0x7a
jne 0x140001213
mov edx, 1
lea rcx, str.NUL:
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__open]
jmp 0x140001219
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov ebx, eax
cmp eax, 2
je 0x140001235
mov edx, 2
mov ecx, eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__dup2]
mov ecx, ebx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__close]
mov rax, qword [r14 + 0x30]
cmp byte [rax], 0x2d
jne 0x140001244
cmp byte [rax + 1], bpl
je 0x14000125b
mov rcx, qword [rsp + 0x48]
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wchdir]
test eax, eax
js 0x140001473
mov rax, qword [r14 + 0x38]
cmp byte [rax], 0x79
jne 0x14000129e
mov ebx, 3
nop dword [rax]
cmp ebx, r15d
je 0x140001294
cmp ebx, r12d
je 0x140001294
cmp ebx, esi
je 0x140001294
mov ecx, ebx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__get_osfhandle]
cmp rax, 0xffffffffffffffff
je 0x140001294
mov ecx, ebx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__close]
inc ebx
cmp ebx, 0x3e8
jl 0x140001270
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov ecx, r15d
mov rdi, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__get_osfhandle]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [rsp + 0x30], 2
lea r9, [rsp + 0x58]
mov rcx, rax
mov dword [rsp + 0x28], ebp
mov r8, rdi
mov dword [rsp + 0x20], ebp
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
mov ecx, r15d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__close]
mov rcx, qword [rsp + 0x58]
mov edx, 0x81
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__open_osfhandle]
mov r15d, eax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov ecx, r12d
mov rdi, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__get_osfhandle]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [rsp + 0x30], 2
lea r9, [rsp + 0x58]
mov rcx, rax
mov dword [rsp + 0x28], ebp
mov r8, rdi
mov dword [rsp + 0x20], ebp
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
mov ecx, r12d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__close]
mov rcx, qword [rsp + 0x58]
mov edx, 0x80
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__open_osfhandle]
mov rcx, qword [r14 + 0x48]
lea r8, [rsp + 0x48]
mov rdi, qword [rsp + 0x48]
mov ebx, ebp
mov r12d, eax
cmp byte [rcx], 0x77
mov ecx, dword [rsp + 0x44]
lea rdx, [rdi + r13*8]
setne bl
sub ecx, r13d
call fcn.1400014a0
mov r8, qword [r14 + 0x40]
mov ecx, ebx
mov rdx, qword [rdi + 0x50]
cmp byte [r8], 0x79
mov r8, qword [rsp + 0x48]
jne 0x140001397
call qword [sym.imp.api_ms_win_crt_process_l1_1_0.dll__wspawnvp]
jmp 0x14000139d
call qword [sym.imp.api_ms_win_crt_process_l1_1_0.dll__wspawnv]
mov qword [rsp + 0x50], rax
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov edx, 2
mov ecx, esi
mov ebx, dword [rax]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__dup2]
cmp qword [rsp + 0x50], 0xffffffffffffffff
jne 0x1400013c7
test ebx, ebx
jne 0x140001481
mov r8d, 8
lea rdx, [rsp + 0x60]
mov ecx, r15d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__write]
mov r8d, 8
lea rdx, [rsp + 0x50]
mov ecx, r15d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__write]
mov r8d, 1
lea rdx, [rsp + 0x40]
mov ecx, r12d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, r14
call sub.glib_2.0_0.dll_g_strfreev
mov r13, qword [rsp + 0x78]
xor eax, eax
mov r12, qword [rsp + 0x80]
mov rdi, qword [rsp + 0xb0]
mov rsi, qword [rsp + 0xa8]
mov rbx, qword [rsp + 0xa0]
mov r14, qword [rsp + 0x70]
add rsp, 0x88
pop r15
pop rbp
ret
lea rax, str.argc___ARG_COUNT
mov r8d, 0xdc
lea r9, str.WinMain
mov qword [rsp + 0x20], rax
lea rdx, str..._glib_gspawn_win32_helper.c
xor ecx, ecx
call sub.glib_2.0_0.dll_g_assertion_message_expr
int3
mov edx, 1
mov ecx, r15d
call fcn.140001650
int3
cmp ebx, 2
mov ecx, r15d
sete bpl
lea rdx, [rbp + 2]
call fcn.140001650
int3