Function at 0x1800590f0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x370]
sub rsp, 0x470
mov rax, qword [0x18006af78]
xor rax, rsp
mov qword [rbp + 0x368], rax
mov rdi, r8
mov r12d, edx
mov dword [rsp + 0x30], edx
mov r13, rcx
mov qword [rsp + 0x68], rcx
mov r14d, edx
lea eax, [rdx + 0xd]
xor r9d, r9d
mov ebx, dword [rsp + 0x48]
cmp edx, eax
jae 0x180059af7
lea rdx, [0x180000000]
lea r10d, [r9 + 4]
mov r15, qword [rsp + 0x58]
mov eax, dword [rsp + 0x38]
mov qword [rsp + 0x40], rax
mov r12, qword [rsp + 0x58]
mov ecx, r14d
nop dword [rax + rax]
lea eax, [r14 - 0x5a]
cmp eax, 0x1e
ja case.default.0x180059187
mov ecx, dword [rdx + rax*4 + 0x59e4c]
add rcx, rdx
jmp rcx
mov rax, qword [r15 + 8]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x20], 0xf6
mov r9, qword [rsp + 0x60]
mov r8, qword [r15]
lea rdx, [rsp + 0x38]
mov rcx, qword [rsp + 0x50]
call fcn.180015af0
mov rsi, qword [rsp + 0x40]
lea rdx, [0x180000000]
mov r10d, 4
xor r9d, r9d
mov ecx, dword [rsp + 0x30]
inc r14d
lea eax, [rcx + 0xd]
cmp r14d, eax
jb 0x180059170
mov r12d, dword [rsp + 0x30]
mov r15d, r12d
imul r13d, r12d, 0x64a
cmp r12d, r13d
ja case.0x180059187.120
movabs rdx, 0x72006500730075
mov ecx, 0x61
mov r12, qword [rsp + 0x58]
movabs rax, 0x64002e00320033
cmp r15d, 0xca80
ja 0x180059bb8
je 0x180059bac
cmp r15d, 0x2f20
ja 0x180059b1f
je case.0x180059187.120
cmp r15d, 0x5a
je 0x180059b13
cmp r15d, 0x68
je 0x180059b05
cmp r15d, 0x28c8
jne 0x180059e29
mov r8d, 2
lea rdx, [0x180061e64]
lea rcx, [rbp + 0x341]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
mov ecx, 0x61
movabs rdx, 0x72006500730075
jmp 0x180059e29
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9, rax
mov rsi, qword [rsp + 0x50]
mov r8, qword [rsi + 8]
mov edx, 1
mov rcx, qword [rsi]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rsi, rax
mov eax, dword [rdi]
mov dword [rsp + 0x38], eax
xor r9d, r9d
lea r8, [rsp + 0x38]
mov rdx, r13
mov ecx, 0xa5
call fcn.180003c60
add esi, eax
mov qword [rsp + 0x40], rsi
jmp 0x1800591b6
mov qword [rsp + 0x50], 0x40
xor edx, edx
mov r8d, 0x10a
lea rcx, [rsp + 0x50]
call fcn.180034770
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x38], 0
lea r9, [rbp + 0x90]
mov r8d, PathMakeUniqueName
lea rdx, [rsp + 0x38]
lea rcx, [rbp - 0x60]
call fcn.18003a6a0
jmp 0x1800591b1
mov r8, r15
mov edx, 0x138
xor ecx, ecx
call fcn.18004d910
mov r8, qword [rsp + 0x50]
mov edx, 0x138
xor ecx, ecx
call fcn.18004d910
jmp 0x1800591b1
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r12, rax
cmp dword [rdi], 1
jle 0x1800591b1
lea rdx, [0x1800604d8]
mov rcx, qword [r13 + 8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov r12, rax
test rax, rax
jne 0x1800591b1
mov esi, 0x62
cmp esi, 0x62
je 0x1800593ab
cmp esi, 0x27d0
jne 0x1800593e6
mov eax, ebx
mov rcx, qword [rbp + 0x368]
xor rcx, rsp
call fcn.18005d0c0
mov rbx, qword [rsp + 0x4b8]
add rsp, 0x470
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
mov rbx, rax
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
mov r9, rbx
mov r8, qword [r13 + 8]
lea rdx, str.prompt_ERROR_extension_not_found_:
call fcn.18005c9f0
mov ebx, 1
mov dword [rsp + 0x48], ebx
add esi, 0x276e
cmp esi, 0x4edc
jbe 0x180059372
jmp 0x1800591b1
mov r14d, 0x118
nop word [rax + rax]
mov eax, r14d
sub eax, 0x118
je 0x1800598ef
sub eax, 0x5b
je 0x18005981e
sub eax, 0x5b
je 0x1800595d0
cmp eax, 0x5b
jne 0x180059924
mov rcx, qword [rdi + 0x98]
movzx eax, byte [rcx]
cmp al, 0xd
je 0x180059481
cmp al, 0xa
je 0x180059481
cmp al, 0xc2
jne 0x180059455
cmp byte [rcx + 1], 0x85
je 0x180059481
cmp al, 0xe2
jne 0x180059a4e
movzx eax, byte [rcx + 1]
cmp al, 0x80
jne 0x180059a4e
cmp byte [rcx + 2], 0xa8
je 0x180059481
cmp al, al
jne 0x180059a4e
cmp byte [rcx + 2], 0xa9
jne 0x180059a4e
mov esi, 0x84
mov eax, esi
sub eax, 0x84
je 0x1800594b0
cmp eax, 1
jne 0x1800595b2
cmp dword [rdi + 0x100], 0
jne 0x1800595b2
mov dword [rdi + 0x154], eax
jmp 0x1800595b2
cmp qword [rdi + 0xa8], 2
jae 0x1800594ec
mov qword [rsp + 0x38], 2
mov qword [rsp + 0x20], rdi
mov r9d, 0x58
xor r8d, r8d
lea rdx, [rsp + 0x38]
xor ecx, ecx
call fcn.180037f00
test eax, eax
je 0x180059af0
xor r9d, r9d
lea r10d, [r9 + 4]
mov rdx, qword [rdi + 0x98]
movzx eax, byte [rdx]
cmp al, 0xd
jne 0x180059527
cmp byte [rdx + 1], 0xa
jne 0x180059551
add qword [rdi + 0xe0], 2
mov qword [rdi + 0xf0], r9
inc qword [rdi + 0xe8]
add qword [rdi + 0xa8], 0xfffffffffffffffe
lea rax, [rdx + 2]
jmp 0x1800595ab
cmp al, 0xa
je 0x180059551
cmp al, 0xc2
jne 0x180059535
cmp byte [rdx + 1], 0x85
je 0x180059551
cmp al, 0xe2
jne 0x1800595b2
movzx eax, byte [rdx + 1]
cmp al, 0x80
jne 0x1800595b2
cmp byte [rdx + 2], 0xa8
je 0x180059551
cmp al, al
jne 0x1800595b2
cmp byte [rdx + 2], 0xa9
jne 0x1800595b2
inc qword [rdi + 0xe0]
mov qword [rdi + 0xf0], r9
inc qword [rdi + 0xe8]
dec qword [rdi + 0xa8]
movzx ecx, byte [rdx]
test cl, cl
js 0x18005957b
mov eax, 1
jmp 0x1800595a8
movzx eax, cl
and al, 0xe0
cmp al, 0xc0
jne 0x18005958b
mov eax, 2
jmp 0x1800595a8
movzx eax, cl
and al, 0xf0
cmp al, 0xe0
jne 0x18005959b
mov eax, 3
jmp 0x1800595a8
and cl, 0xf8
mov rax, r9
cmp cl, 0xf0
cmove rax, r10
add rax, rdx
mov qword [rdi + 0x98], rax
inc esi
cmp esi, 0x86
jb 0x180059486
jmp 0x180059924
mov rcx, qword [rdi + 0x98]
movzx eax, byte [rcx]
cmp al, 0x20
je 0x1800595fc
cmp dword [rdi + 0x100], 0
jne 0x1800595f4
cmp dword [rdi + 0x154], 0
jne 0x180059714
cmp al, 9
jne 0x180059714
mov esi, 0x3b
mov eax, esi
sub eax, 0x3b
je 0x180059672
cmp eax, 0x76
jne 0x180059700
cmp qword [rdi + 0xa8], 1
jae 0x180059700
mov qword [rsp + 0x38], 1
mov qword [rsp + 0x20], rdi
lea r9d, [rax - 0x1e]
xor r8d, r8d
lea rdx, [rsp + 0x38]
xor ecx, ecx
call fcn.180037f00
test eax, eax
jne 0x1800596f7
mov ecx, 0x68
nop dword [rax]
mov eax, ecx
sub eax, 0x67
je case.0x180059187.120
xor r9d, r9d
cmp eax, 1
jne 0x180059666
mov ebx, r9d
dec ecx
cmp ecx, 0x66
ja 0x180059650
jmp 0x1800596fa
inc qword [rdi + 0xe0]
inc qword [rdi + 0xf0]
dec qword [rdi + 0xa8]
mov rdx, qword [rdi + 0x98]
movzx ecx, byte [rdx]
test cl, cl
js 0x1800596a7
mov eax, 1
lea rcx, [rax + rdx]
mov qword [rdi + 0x98], rcx
jmp 0x180059700
movzx eax, cl
and al, 0xe0
cmp al, 0xc0
jne 0x1800596c2
mov eax, 2
lea rcx, [rax + rdx]
mov qword [rdi + 0x98], rcx
jmp 0x180059700
movzx eax, cl
and al, 0xf0
cmp al, 0xe0
jne 0x1800596dd
mov eax, 3
lea rcx, [rax + rdx]
mov qword [rdi + 0x98], rcx
jmp 0x180059700
and cl, 0xf8
mov rax, r9
cmp cl, 0xf0
cmove rax, r10
lea rcx, [rax + rdx]
mov qword [rdi + 0x98], rcx
jmp 0x180059700
xor r9d, r9d
mov r10d, 4
add esi, 0x76
cmp esi, 0xec
jbe 0x180059601
jmp 0x1800595d0
cmp al, 0x23
jne 0x180059924
nop dword [rax]
cmp al, 0xa
je 0x180059924
cmp al, 0xc2
jne 0x180059736
cmp byte [rcx + 1], 0x85
je 0x180059924
cmp al, 0xe2
jne 0x18005975b
movzx edx, byte [rcx + 1]
cmp dl, 0x80
jne 0x18005975b
cmp byte [rcx + 2], 0xa8
je 0x180059924
cmp dl, dl
jne 0x18005975b
cmp byte [rcx + 2], 0xa9
je 0x180059924
test al, al
je 0x180059924
inc qword [rdi + 0xe0]
inc qword [rdi + 0xf0]
mov rdx, qword [rdi + 0xa8]
dec rdx
mov qword [rdi + 0xa8], rdx
mov r8, qword [rdi + 0x98]
movzx ecx, byte [r8]
test cl, cl
js 0x180059798
mov eax, 1
jmp 0x1800597c5
movzx eax, cl
and al, 0xe0
cmp al, 0xc0
jne 0x1800597a8
mov eax, 2
jmp 0x1800597c5
movzx eax, cl
and al, 0xf0
cmp al, 0xe0
jne 0x1800597b8
mov eax, 3
jmp 0x1800597c5
and cl, 0xf8
mov rax, r9
cmp cl, 0xf0
cmove rax, r10
add rax, r8
mov qword [rdi + 0x98], rax
cmp rdx, 1
jae 0x180059807
mov qword [rsp + 0x38], 1
mov qword [rsp + 0x20], rdi
mov r9d, 0x58
xor r8d, r8d
lea rdx, [rsp + 0x38]
xor ecx, ecx
call fcn.180037f00
test eax, eax
je 0x180059af0
xor r9d, r9d
lea r10d, [r9 + 4]
mov rcx, qword [rdi + 0x98]
movzx eax, byte [rcx]
cmp al, 0xd
jne 0x180059720
jmp 0x180059924
cmp qword [rdi + 0xf0], 0
jne 0x18005989e
mov rdx, qword [rdi + 0x98]
cmp byte [rdx], 0xef
jne 0x18005989e
cmp byte [rdx + 1], 0xbb
jne 0x18005989e
cmp byte [rdx + 2], 0xbf
jne 0x18005989e
inc qword [rdi + 0xe0]
mov qword [rdi + 0xf0], 1
dec qword [rdi + 0xa8]
movzx ecx, byte [rdx]
test cl, cl
js 0x180059867
mov eax, 1
jmp 0x180059894
movzx eax, cl
and al, 0xe0
cmp al, 0xc0
jne 0x180059877
mov eax, 2
jmp 0x180059894
movzx eax, cl
and al, 0xf0
cmp al, 0xe0
jne 0x180059887
mov eax, 3
jmp 0x180059894
and cl, 0xf8
mov rax, r9
cmp cl, 0xf0
cmove rax, r10
add rax, rdx
mov qword [rdi + 0x98], rax
cmp qword [rdi + 0xa8], 1
jae 0x180059924
mov qword [rsp + 0x38], 1
mov qword [rsp + 0x20], rdi
mov r9d, 0x58
xor r8d, r8d
lea rdx, [rsp + 0x38]
xor ecx, ecx
call fcn.180037f00
test eax, eax
jne 0x180059924
mov ecx, 0x56
mov eax, ecx
sub eax, 0x55
je case.0x180059187.120
cmp eax, 1
jne 0x1800598e6
xor ebx, ebx
dec ecx
cmp ecx, 0x54
ja 0x1800598d4
jmp 0x180059924
cmp qword [rdi + 0xa8], 1
jae 0x180059924
mov qword [rsp + 0x38], 1
mov qword [rsp + 0x20], rdi
mov r9d, 0x58
xor r8d, r8d
lea rdx, [rsp + 0x38]
xor ecx, ecx
call fcn.180037f00
test eax, eax
je 0x180059af0
add r14d, 0x5b
cmp r14d, reloc.SHELL32.dll_SHChangeNotification_Lock
mov r9d, 0
lea r10d, [r9 + 4]
jb 0x180059410
jmp case.0x180059187.118
mov qword [rsp + 0x28], r9
mov dword [rsp + 0x20], 0x8e
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x60]
call fcn.180039fe0
jmp 0x1800591b1
mov byte [rbp + 0x340], 0x43
mov rsi, qword [rsp + 0x40]
jmp 0x1800591c6
mov rcx, qword [r15 + 8]
mov r8, qword [r15 + 0x10]
sub r8, rcx
add rcx, qword [r15]
mov r9, r12
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov esi, eax
mov qword [rsp + 0x40], rsi
test eax, eax
jle 0x180059a2f
mov r13d, esi
nop word [rax + rax]
mov esi, 0x9e
cmp esi, 0x9e
je 0x1800599e8
cmp esi, 0x62c
jne 0x1800599ef
mov rax, qword [r15 + 8]
add rax, 0x400
mov qword [rsp + 0x40], rax
lea r8, [rsp + 0x40]
mov edx, reloc.SHELL32.dll_ILFindLastID
mov rcx, r15
call fcn.180026820
jmp 0x1800599ef
mov eax, r13d
add qword [r15 + 8], rax
add esi, 0x58e
cmp esi, 0xb1c
jbe 0x1800599b5
mov rcx, qword [r15 + 8]
mov r8, qword [r15 + 0x10]
sub r8, rcx
add rcx, qword [r15]
mov r9, r12
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov r13d, eax
test eax, eax
jg 0x1800599b0
mov qword [rsp + 0x40], r13
mov r13, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x40]
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
cmp r12, rax
je 0x1800591b6
mov rcx, r12
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
jmp 0x1800591b6
lea rdx, [0x180000000]
mov ebx, 1
lea r14d, [rbx + 0x76]
mov dword [rsp + 0x48], ebx
mov rsi, qword [rsp + 0x40]
jmp 0x1800591c6
mov qword [rsp + 0x38], 0x400
xor edx, edx
mov r8d, 0x10a
lea rcx, [rsp + 0x38]
call fcn.180034770
mov r15, rax
mov qword [rsp + 0x38], 0x400
lea r8, [rsp + 0x38]
mov edx, reloc.SHELL32.dll_ILFindLastID
mov rcx, rax
call fcn.180026820
jmp 0x1800591b1
mov qword [rsp + 0x58], reloc.SHELL32.dll_ILFindLastID
mov dword [rsp + 0x38], r9d
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x38]
lea r8, [rbp - 0x60]
lea rdx, [rbp + 0x90]
mov ecx, 0xec
call fcn.180012430
mov qword [rsp + 0x60], rax
jmp 0x1800591b1
mov rsi, qword [rsp + 0x40]
jmp 0x1800591ca
xor eax, eax
jmp 0x180059381
mov esi, dword [rsp + 0x38]
mov qword [rsp + 0x40], rsi
jmp 0x1800591da
mov ebx, esi
sar ebx, 0x1f
mov dword [rsp + 0x48], ebx
jmp 0x180059e29
mov byte [rbp + 0x341], 0
jmp 0x180059e29
cmp r15d, 0x5136
je 0x180059ba0
cmp r15d, 0x79a4
je 0x180059b74
cmp r15d, 0xa212
jne 0x180059e29
lea rcx, [rbp + 0x340]
dec rcx
nop dword [rax + rax]
lea rcx, [rcx + 1]
cmp byte [rcx], 0
jne 0x180059b50
movzx eax, word [0x180061fe4]
mov word [rcx], ax
mov qword [rbp + 0x350], rdx
mov ecx, 0x61
jmp 0x180059e29
mov eax, dword [str.rLow]
mov dword [rbp + 0x343], eax
movzx eax, word [0x180061ff4]
mov word [rbp + 0x347], ax
movzx eax, byte [0x180061ff6]
mov byte [rbp + 0x349], al
jmp 0x180059e29
mov word [rbp + 0x342], cx
jmp 0x180059e29
mov qword [rbp + 0x358], rax
jmp 0x180059e29
cmp r15d, 0x16c38
ja 0x180059e01
je 0x180059dd9
cmp r15d, 0xf2ee
je 0x180059da6
cmp r15d, 0x11b5c
je 0x180059d43
cmp r15d, 0x143ca
jne 0x180059e29
xor r9d, r9d
lea r8, [rbp + 0xb0]
xor edx, edx
lea ecx, [rdx + 0x2b]
call fcn.18001a2e0
lea r9, [rsp + 0x70]
lea r8, [rsp + 0x38]
mov edx, 0x11c
lea rcx, [rbp + 0xb0]
call fcn.18005b9b0
test al, al
je 0x180059dc8
nop dword [rax]
mov esi, 0xf7
mov eax, esi
sub eax, 0xf6
je 0x180059c54
cmp eax, 1
jne 0x180059d10
mov rcx, qword [rsp + 0x70]
call r12
jmp 0x180059d10
xor r14d, r14d
mov qword [rbp + 0x80], r14
mov qword [rbp + 0x88], 7
mov word [rbp + 0x70], r14w
mov rdx, qword [rsp + 0x70]
mov r8, 0xffffffffffffffff
nop word [rax + rax]
inc r8
cmp word [rdx + r8*2], r14w
jne 0x180059c80
lea rcx, [rbp + 0x70]
call fcn.1800259e0
nop
mov rdx, qword [rdi + 8]
cmp rdx, qword [rdi + 0x10]
je 0x180059cc1
movups xmm0, xmmword [rbp + 0x70]
movups xmmword [rdx], xmm0
movups xmm1, xmmword [rbp + 0x80]
movups xmmword [rdx + 0x10], xmm1
mov edx, 7
mov word [rbp + 0x70], r14w
add qword [rdi + 8], 0x20
jmp 0x180059cd4
lea r8, [rbp + 0x70]
mov rcx, rdi
call fcn.180001bd0
mov rdx, qword [rbp + 0x88]
cmp rdx, 8
jb 0x180059d10
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180059d0b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180059e42
call fcn.18005cbb4
dec esi
cmp esi, 0xf5
ja 0x180059c35
lea r9, [rsp + 0x70]
lea r8, [rsp + 0x38]
mov edx, 0x11c
lea rcx, [rbp + 0xb0]
call fcn.18005b9b0
test al, al
jne 0x180059c30
jmp 0x180059d8d
lea rax, [rbp + 0x350]
mov qword [rsp + 0x20], rax
mov r9d, reloc.SHELL32.dll_SHSetInstanceExplorer
xor r8d, r8d
xor edx, edx
lea rcx, [rbp + 0x340]
call fcn.180005340
mov r12, rax
mov r14, qword [rdi + 8]
mov rsi, qword [rdi]
cmp rsi, r14
je 0x180059d89
mov rcx, rsi
call fcn.180025330
add rsi, 0x20
cmp rsi, r14
jne 0x180059d75
mov rsi, qword [rdi]
mov qword [rdi + 8], rsi
mov rsi, qword [rsp + 0x40]
mov ecx, 0x61
movabs rdx, 0x72006500730075
jmp 0x180059e29
mov word [rbp + 0x360], r9w
mov r8d, 2
lea rdx, [0x18006202a]
lea rcx, [rbp + 0x350]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncat]
mov ecx, 0x61
movabs rdx, 0x72006500730075
jmp 0x180059e29
xor r9d, r9d
xor r8d, r8d
mov edx, 0x128
lea rcx, [rbp + 0xb0]
call fcn.1800516b0
mov ecx, 0x61
movabs rdx, 0x72006500730075
jmp 0x180059e29
cmp r15d, 0x194a6
je 0x180059e19
cmp r15d, 0x1bd14
je case.0x180059187.120
jmp 0x180059e29
mov rax, qword [rdi + 8]
cmp qword [rdi], rax
setne byte [rsp + 0x48]
mov ebx, dword [rsp + 0x48]
imul eax, dword [rsp + 0x30], 0x73
add r15d, eax
cmp r15d, r13d
ja case.0x180059187.120
xor r9d, r9d
jmp 0x180059201
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3