Function at 0x403390
Capabilities:
Accept command line arguments
Enumerate files on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x2e8
mov qword [rsp + 0x330], rcx
mov qword [rsp + 0x338], rdx
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
test rax, rax
je 0x403a61
mov dword [rsp + 0x6c], 0
lea rdx, [rsp + 0x6c]
mov rcx, rax
call qword [sym.imp.SHELL32.dll_CommandLineToArgvW]
test rax, rax
mov rbx, rax
je 0x403a61
mov qword [rsp + 0x70], 0
mov ecx, dword [rsp + 0x6c]
mov qword [rsp + 0x78], 0
mov qword [rsp + 0x80], 0
test ecx, ecx
jle 0x403417
lea rcx, [rsp + 0x70]
mov rdx, rax
call fcn.0040d8a0
cmp dword [rsp + 0x6c], 1
jle 0x4036b2
mov r15, qword [sym.imp.KERNEL32.dll_FindNextFileW]
lea rax, [rbx + 8]
mov dword [rsp + 0x44], 1
mov qword [rsp + 0x38], rax
lea r14, [rsp + 0x90]
lea rax, [rsp + 0x70]
mov qword [rsp + 0x58], rax
lea rdi, [r14 + 0x2c]
mov rax, qword [rsp + 0x38]
mov edx, 0x3f
mov rcx, qword [rax]
call sym.wcschr
test rax, rax
je 0x403647
mov rax, qword [rsp + 0x38]
mov rdx, qword [rax]
movzx eax, word [rdx]
cmp ax, 0x22
je 0x403670
cmp ax, 0x2d
je 0x403670
xor edx, edx
mov r8d, 0x250
mov rcx, r14
call sym.memset
mov rsi, qword [rsp + 0x38]
mov rcx, qword [rsi]
call sym.wcslen
lea ebx, [rax + 2]
movabs rax, 0x3f80000000000000
movsxd rbx, ebx
cmp rbx, rax
ja 0x403b05
lea rcx, [rbx + rbx]
call sym.operator_new___unsigned_long_long_
mov rdx, qword [rsi]
mov rbp, rax
mov r8, rbx
mov rcx, rbp
call sym.wcsncpy
mov edx, 0x5c
mov rcx, rbp
call sym.wcsrchr
test rax, rax
je 0x40398f
xor edx, edx
mov word [rax + 2], dx
mov rcx, rbp
call sym.wcslen
mov rdx, r14
mov r13, rax
mov rax, qword [rsp + 0x38]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp rax, 0xffffffffffffffff
mov r12, rax
jne 0x403547
jmp 0x40399a
test rax, rax
je 0x40352d
mov qword [rax], rsi
mov rax, qword [rsp + 0x78]
add rax, 8
mov qword [rsp + 0x78], rax
mov rdx, r14
mov rcx, r12
call r15
test eax, eax
je 0x403940
mov rcx, rdi
call sym.wcslen
lea ebx, [r13 + rax + 1]
movabs rax, 0x3f80000000000000
movsxd rbx, ebx
cmp rbx, rax
ja 0x403a93
lea rcx, [rbx + rbx]
call sym.operator_new___unsigned_long_long_
mov rsi, rax
mov r8, rbx
mov rdx, rbp
mov rcx, rax
call sym.wcsncpy
mov r8, rbx
mov rdx, rdi
mov rcx, rsi
call sym.wcsncat
mov rax, qword [rsp + 0x78]
cmp rax, qword [rsp + 0x80]
mov r8, rax
jne 0x403520
sub rax, qword [rsp + 0x70]
sar rax, 3
test rax, rax
je 0x403640
lea rdx, [rax + rax]
cmp rax, rdx
jbe 0x403ad8
mov rbx, 0xfffffffffffffff8
mov rcx, rbx
call sym.operator_new_unsigned_long_long_
mov r8, qword [rsp + 0x78]
mov r9, rax
mov r10, qword [rsp + 0x70]
mov r11, r8
mov rax, r9
sub r11, r10
add rax, r11
je 0x4035f4
mov qword [rax], rsi
mov rax, r11
sar rax, 3
test rax, rax
jne 0x403960
lea rsi, [r9 + r11 + 8]
test r10, r10
je 0x403620
mov rcx, r10
mov qword [rsp + 0x48], r9
call sym.operator_delete_void_
mov r9, qword [rsp + 0x48]
add rbx, r9
mov qword [rsp + 0x70], r9
mov qword [rsp + 0x78], rsi
mov qword [rsp + 0x80], rbx
jmp 0x403536
mov ebx, 8
jmp 0x4035ce
mov rax, qword [rsp + 0x38]
mov edx, 0x2a
mov rcx, qword [rax]
call sym.wcschr
test rax, rax
jne 0x40346b
mov rax, qword [rsp + 0x38]
mov rdx, qword [rax]
nop word [rax + rax]
mov rax, qword [rsp + 0x78]
cmp rax, qword [rsp + 0x80]
je 0x4039ab
test rax, rax
je 0x403690
mov qword [rax], rdx
mov rax, qword [rsp + 0x78]
add rax, 8
mov qword [rsp + 0x78], rax
add dword [rsp + 0x44], 1
add qword [rsp + 0x38], 8
mov eax, dword [rsp + 0x44]
cmp dword [rsp + 0x6c], eax
jg 0x403450
movabs rax, 0x7f00000000000007
mov rcx, qword [rsp + 0x78]
sub rcx, qword [rsp + 0x70]
cmp rcx, rax
ja 0x403b0a
call sym.operator_new___unsigned_long_long_
mov rdi, qword [rsp + 0x70]
mov rbx, rax
mov rsi, qword [rsp + 0x78]
cmp rdi, rsi
je 0x40370a
lea rax, [rdi + 8]
mov rdx, rsi
mov rcx, rbx
sub rdx, rax
mov rax, rdx
mov rdx, rdi
shr rax, 3
lea r8, [rax*8 + 8]
call sym.memcpy
mov qword [rsp + 0x90], 0
mov rax, rsi
mov qword [rsp + 0x98], 0
sub rax, rdi
mov qword [rsp + 0xa0], 0
sar rax, 3
test eax, eax
mov dword [rsp + 0x6c], eax
jle 0x4037f9
lea rax, [rsp + 0x90]
xor esi, esi
movabs rbp, 0x1fffffffffffffff
mov qword [rsp + 0x38], rax
jmp 0x40379a
cmp rax, qword [rsp + 0xa0]
mov rdx, rax
je 0x4039bf
test rax, rax
je 0x403781
mov qword [rax], r12
mov rax, qword [rsp + 0x98]
add rax, 8
mov qword [rsp + 0x98], rax
add esi, 1
add rbx, 8
cmp dword [rsp + 0x6c], esi
jle 0x4037f9
mov qword [rsp + 0x20], 0
mov rcx, qword [rbx]
xor r9d, r9d
xor r8d, r8d
mov edx, 0xffffffff
call sym.g_utf16_to_utf8
mov r12, rax
mov rax, qword [rsp + 0x98]
test r12, r12
jne 0x403760
cmp rax, qword [rsp + 0xa0]
je 0x403a7d
test rax, rax
mov rdx, qword [0x00416030]
je 0x4037e3
mov qword [rax], rdx
add qword [rsp + 0x98], 8
add esi, 1
add rbx, 8
cmp dword [rsp + 0x6c], esi
jg 0x40379a
mov rcx, qword [rsp + 0x98]
movabs rax, 0x7f00000000000007
sub rcx, qword [rsp + 0x90]
cmp rcx, rax
ja 0x403b3f
call sym.operator_new___unsigned_long_long_
mov rcx, qword [rsp + 0x90]
mov r9, qword [rsp + 0x98]
cmp rcx, r9
je 0x4038eb
lea r11, [rcx + 8]
mov r8, r9
lea rdx, [rcx + 0x10]
sub r8, r11
shr r8, 3
add r8, 1
cmp rax, rdx
lea rdx, [rax + 0x10]
setae r10b
cmp rcx, rdx
setae dl
or r10b, dl
mov rdx, rcx
je 0x403aa2
cmp r8, 0x18
jbe 0x403aa2
shl rdx, 0x3c
shr rdx, 0x3f
cmp rdx, r8
cmova rdx, r8
test rdx, rdx
je 0x403a98
mov r10, qword [rcx]
mov esi, 1
mov qword [rax], r10
sub r8, rdx
shl rdx, 3
xor ebx, ebx
lea r10, [r8 - 2]
lea r12, [rcx + rdx]
shr r10, 1
add rdx, rax
lea rbp, [r10 + 1]
xor r10d, r10d
lea rdi, [rbp + rbp]
movdqa xmm0, xmmword [r12 + r10]
add rbx, 1
movups xmmword [rdx + r10], xmm0
add r10, 0x10
cmp rbp, rbx
ja 0x4038bd
lea edx, [rsi + rdi]
cmp rdi, r8
lea r10, [r11 + rdi*8]
je 0x4038eb
mov r8, qword [r10]
movsxd rdx, edx
mov qword [rax + rdx*8], r8
mov rdi, qword [rsp + 0x338]
mov qword [rdi], rax
mov rdi, qword [rsp + 0x330]
mov rax, r9
sub rax, rcx
sar rax, 3
test rcx, rcx
mov dword [rdi], eax
je 0x403914
call sym.operator_delete_void_
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x403923
call sym.operator_delete_void_
mov eax, 1
add rsp, 0x2e8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_FindClose]
mov rcx, rbp
call sym.operator_delete___void_
jmp 0x403699
mov r8, r11
mov rdx, r10
mov rcx, r9
mov qword [rsp + 0x50], r11
mov qword [rsp + 0x48], r10
call sym.memmove
mov r11, qword [rsp + 0x50]
mov r9, rax
mov r10, qword [rsp + 0x48]
lea rsi, [rax + r11 + 8]
jmp 0x40360e
xor eax, eax
mov word [rbp], ax
jmp 0x4034f6
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x58]
call fcn.0040d8a0
jmp 0x403949
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x58]
call fcn.0040d7a0
jmp 0x403699
sub rax, qword [rsp + 0x90]
sar rax, 3
test rax, rax
je 0x403a59
lea rcx, [rax + rax]
movabs r13, 0x1fffffffffffffff
cmp rax, rcx
jbe 0x403b26
shl r13, 3
mov rcx, r13
call sym.operator_new_unsigned_long_long_
mov rdx, qword [rsp + 0x98]
mov r14, rax
mov r15, qword [rsp + 0x90]
mov rdi, rdx
mov rax, r14
sub rdi, r15
add rax, rdi
je 0x403a1b
mov qword [rax], r12
mov rax, rdi
sar rax, 3
test rax, rax
jne 0x403a68
lea r12, [r14 + rdi + 8]
test r15, r15
je 0x403a39
mov rcx, r15
call sym.operator_delete_void_
add r13, r14
mov qword [rsp + 0x90], r14
mov qword [rsp + 0x98], r12
mov qword [rsp + 0xa0], r13
jmp 0x40378d
mov r13d, 1
jmp 0x4039eb
xor eax, eax
jmp 0x403928
mov r8, rdi
mov rdx, r15
mov rcx, r14
call sym.memmove
lea r12, [r14 + rdi + 8]
jmp 0x403a31
mov rcx, qword [rsp + 0x38]
lea rdx, [0x00416030]
call fcn.0040d6a0
jmp 0x40378d
call sym.__cxa_throw_bad_array_new_length
mov r11, rcx
xor esi, esi
jmp 0x40389a
mov r8, rax
mov r10, qword [rdx]
add rdx, 8
add r8, 8
mov qword [r8 - 8], r10
cmp r9, rdx
jne 0x403aa5
jmp 0x4038eb
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x403ad0
call sym.operator_delete_void_
mov rcx, rbx
call sym._Unwind_Resume
movabs rcx, 0x1fffffffffffffff
cmp rdx, rcx
ja 0x4035c7
xor ebx, ebx
xor r9d, r9d
test rdx, rdx
je 0x4035de
shl rax, 4
mov rbx, rax
jmp 0x4035ce
call sym.__cxa_throw_bad_array_new_length
call sym.__cxa_throw_bad_array_new_length
mov rcx, qword [rsp + 0x90]
mov rbx, rax
test rcx, rcx
je 0x403ac1
call sym.operator_delete_void_
jmp 0x403ac1
cmp rcx, rbp
ja 0x4039eb
test rcx, rcx
jne 0x403b44
xor r13d, r13d
xor r14d, r14d
jmp 0x403a02
call sym.__cxa_throw_bad_array_new_length
mov r13, rcx
jmp 0x4039eb