Function at 0x18002cac0
Capabilities:
Check if file exists

Disassembly:
mov r11, rsp
push rsi
push rdi
push r12
sub rsp, 0x240
mov qword [rsp + 0x188], 0xfffffffffffffffe
mov qword [r11 + 0x18], rbx
mov qword [r11 + 0x20], rbp
mov rax, qword [0x1800ba080]
xor rax, rsp
mov qword [rsp + 0x230], rax
mov rsi, rdx
mov rbx, rcx
mov qword [r11 - 0xd8], rcx
xor r12d, r12d
mov dword [rsp + 0x30], r12d
mov qword [r11 - 0x30], 0xf
mov qword [r11 - 0x38], r12
mov byte [r11 - 0x48], r12b
mov qword [r11 - 0x80], 0xf
mov qword [r11 - 0x88], r12
mov byte [rsp + 0x1c0], r12b
lea r8, [r11 - 0xa0]
lea rdx, [r11 - 0x50]
mov rcx, rsi
call fcn.18002fb80
test eax, eax
jne 0x18002cc89
mov edi, dword [rsp + 0x90]
and edi, 0xfffffe00
mov dword [rsp + 0x90], edi
mov qword [rsp + 0x98], r12
mov qword [rsp + 0xa0], r12
mov qword [rsp + 0xa8], r12
lea r8, [rsp + 0x210]
cmp qword [rsp + 0x228], 0x10
cmovae r8, qword [rsp + 0x210]
lea r9, [rsp + 0x88]
lea edx, [rax + 1]
lea rcx, [rsp + 0x38]
call fcn.18002f67c
nop
mov byte [rsp + 0x20], r12b
mov r9d, 0xc8
xor r8d, r8d
mov rdx, rax
mov rcx, rbx
call fcn.18002fa44
mov dword [rsp + 0x30], 1
cmp qword [rsp + 0x58], 0x10
jb 0x18002cbda
mov rcx, qword [rsp + 0x40]
call fcn.18006e998
mov qword [rsp + 0x58], socket
mov qword [rsp + 0x50], r12
mov byte [rsp + 0x40], 0
movsx eax, byte [rsp + 0x90]
cmp eax, 4
je 0x18002cc21
add eax, 0xfffffffa
cmp eax, 1
ja 0x18002cc35
mov rdi, qword [rsp + 0x88]
test rdi, rdi
je 0x18002cc35
mov rcx, rdi
call fcn.18005a3b8
mov rcx, rdi
call fcn.18006e998
jmp 0x18002cc35
bt edi, 8
jae 0x18002cc35
mov rcx, qword [rsp + 0x88]
call fcn.18006fc10
nop
cmp qword [rsp + 0x1d8], 0x10
jb 0x18002cc4d
mov rcx, qword [rsp + 0x1c0]
call fcn.18006e998
mov qword [rsp + 0x1d8], socket
mov qword [rsp + 0x1d0], r12
mov byte [rsp + 0x1c0], 0
cmp qword [rsp + 0x228], 0x10
jb 0x18002cc81
mov rcx, qword [rsp + 0x210]
call fcn.18006e998
mov rax, rbx
jmp 0x18002da36
and dword [rsp + 0xe8], 0xfffffe00
mov qword [rsp + 0xf0], r12
mov qword [rsp + 0xf8], r12
mov qword [rsp + 0x100], r12
mov qword [rsp + 0xa8], socket
mov qword [rsp + 0xa0], r12
mov byte [rsp + 0x90], 0
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rsi
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
mov rdx, rsi
lea rcx, [rsp + 0x88]
call fcn.180006440
nop
mov dword [rsp + 0x30], 2
lea rdx, [rsp + 0xe0]
lea rcx, [rsp + 0x88]
call fcn.18000e2f0
test al, al
je 0x18002cd1b
cmp byte [rsp + 0xe8], 7
jne 0x18002cd1b
xor dil, dil
jmp 0x18002cd1e
mov dil, 1
mov dword [rsp + 0x30], r12d
cmp qword [rsp + 0xa8], 0x10
jb 0x18002cd3b
mov rcx, qword [rsp + 0x90]
call fcn.18006e998
test dil, dil
je 0x18002ce3c
and dword [rsp + 0x90], 0xfffffe00
mov qword [rsp + 0x98], r12
mov qword [rsp + 0xa0], r12
mov qword [rsp + 0xa8], r12
lea r9, [rsp + 0x88]
lea r8, str.invalid_request
mov edx, 2
lea rcx, [rsp + 0x38]
call fcn.18002f67c
nop
mov byte [rsp + 0x20], 0
mov r9d, 0xc8
xor r8d, r8d
mov rdx, rax
mov rcx, rbx
call fcn.18002fa44
mov dword [rsp + 0x30], 1
cmp qword [rsp + 0x58], 0x10
jb 0x18002cdb9
mov rcx, qword [rsp + 0x40]
call fcn.18006e998
mov qword [rsp + 0x58], socket
mov qword [rsp + 0x50], r12
mov byte [rsp + 0x40], 0
lea rcx, [rsp + 0x88]
call fcn.180055f84
nop
lea rcx, [rsp + 0xe0]
call fcn.180055f84
nop
cmp qword [rsp + 0x1d8], 0x10
jb 0x18002ce00
mov rcx, qword [rsp + 0x1c0]
call fcn.18006e998
mov qword [rsp + 0x1d8], socket
mov qword [rsp + 0x1d0], r12
mov byte [rsp + 0x1c0], 0
cmp qword [rsp + 0x228], 0x10
jb 0x18002ce34
mov rcx, qword [rsp + 0x210]
call fcn.18006e998
mov rax, rbx
jmp 0x18002da36
mov qword [rsp + 0xd0], socket
mov qword [rsp + 0xc8], r12
mov byte [rsp + 0xb8], 0
mov r8d, 6
lea rdx, str.action
lea rcx, [rsp + 0xb0]
call fcn.180006440
nop
mov qword [rsp + 0x80], socket
mov qword [rsp + 0x78], r12
mov byte [rsp + 0x68], 0
xor r8d, r8d
lea rdx, [0x18009545a]
lea rcx, [rsp + 0x60]
call fcn.180006440
lea r9, [rsp + 0x60]
lea r8, [rsp + 0xb0]
lea rdx, [rsp + 0xe0]
lea rcx, [rsp + 0x1e0]
call fcn.18000f1f0
nop
cmp qword [rsp + 0xd0], 0x10
jb 0x18002ced8
mov rcx, qword [rsp + 0xb8]
call fcn.18006e998
mov qword [rsp + 0xd0], socket
mov qword [rsp + 0xc8], r12
mov byte [rsp + 0xb8], 0
mov qword [rsp + 0xa8], socket
mov qword [rsp + 0xa0], r12
mov byte [rsp + 0x90], 0
mov r8d, 4
lea rdx, str.path
lea rcx, [rsp + 0x88]
call fcn.180006440
nop
mov qword [rsp + 0x178], socket
mov qword [rsp + 0x170], r12
mov byte [rsp + 0x160], 0
xor r8d, r8d
lea rdx, [0x18009545a]
lea rcx, [rsp + 0x158]
call fcn.180006440
lea r9, [rsp + 0x158]
lea r8, [rsp + 0x88]
lea rdx, [rsp + 0xe0]
lea rcx, [rsp + 0x130]
call fcn.18000f1f0
nop
mov rdx, rax
lea rcx, [rsp + 0x190]
call fcn.1800013c0
nop
cmp qword [rsp + 0x150], 0x10
jb 0x18002cfad
mov rcx, qword [rsp + 0x138]
call fcn.18006e998
mov qword [rsp + 0x150], socket
mov qword [rsp + 0x148], r12
mov byte [rsp + 0x138], 0
cmp qword [rsp + 0xa8], 0x10
jb 0x18002cfe1
mov rcx, qword [rsp + 0x90]
call fcn.18006e998
mov qword [rsp + 0xa8], socket
mov qword [rsp + 0xa0], r12
mov byte [rsp + 0x90], 0
lea rcx, [rsp + 0x198]
cmp qword [rsp + 0x1b0], 8
cmovae rcx, qword [rsp + 0x198]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x18002d184
and dword [rsp + 0xb8], 0xfffffe00
mov qword [rsp + 0xc0], r12
mov qword [rsp + 0xc8], r12
mov qword [rsp + 0xd0], r12
lea r9, [rsp + 0xb0]
lea r8, str.path_not_found
lea edx, [rax + 3]
lea rcx, [rsp + 0x38]
call fcn.18002f67c
nop
mov byte [rsp + 0x20], 0
mov r9d, 0xc8
xor r8d, r8d
mov rdx, rax
mov rcx, rbx
call fcn.18002fa44
mov dword [rsp + 0x30], 1
cmp qword [rsp + 0x58], 0x10
jb 0x18002d098
mov rcx, qword [rsp + 0x40]
call fcn.18006e998
mov qword [rsp + 0x58], socket
mov qword [rsp + 0x50], r12
mov byte [rsp + 0x40], 0
lea rcx, [rsp + 0xb0]
call fcn.180055f84
nop
cmp qword [rsp + 0x1b0], 8
jb 0x18002d0d1
mov rcx, qword [rsp + 0x198]
call fcn.18006e998
mov qword [rsp + 0x1b0], 7
mov qword [rsp + 0x1a8], r12
mov word [rsp + 0x198], r12w
cmp qword [rsp + 0x200], 0x10
jb 0x18002d106
mov rcx, qword [rsp + 0x1e8]
call fcn.18006e998
mov qword [rsp + 0x200], socket
mov qword [rsp + 0x1f8], r12
mov byte [rsp + 0x1e8], 0
lea rcx, [rsp + 0xe0]
call fcn.180055f84
nop
cmp qword [rsp + 0x1d8], 0x10
jb 0x18002d148
mov rcx, qword [rsp + 0x1c0]
call fcn.18006e998
mov qword [rsp + 0x1d8], socket
mov qword [rsp + 0x1d0], r12
mov byte [rsp + 0x1c0], 0
cmp qword [rsp + 0x228], 0x10
jb 0x18002d17c
mov rcx, qword [rsp + 0x210]
call fcn.18006e998
mov rax, rbx
jmp 0x18002da36
lea rcx, [rsp + 0x198]
cmp qword [rsp + 0x1b0], 8
cmovae rcx, qword [rsp + 0x198]
call qword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
mov ebp, eax
mov rcx, qword [rsp + 0x200]
cmp rcx, 0x10
jb 0x18002d1c7
mov rdx, qword [rsp + 0x1e8]
test rdx, rdx
je 0x18002d25c
jmp 0x18002d1cf
lea rdx, [rsp + 0x1e8]
lea rcx, str.encrypt
call qword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x18002d24c
test ebp, ebp
je 0x18002d224
lea rcx, [rsp + 0x198]
cmp qword [rsp + 0x1b0], 8
cmovae rcx, qword [rsp + 0x198]
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], r12
mov r9d, 1
lea r8, [0x18004bd90]
mov edx, r9d
call fcn.1800311d4
mov esi, eax
jmp 0x18002d2f1
lea rcx, [rsp + 0x198]
cmp qword [rsp + 0x1b0], 8
cmovae rcx, qword [rsp + 0x198]
xor edx, edx
call fcn.18004b3ac
mov esi, eax
jmp 0x18002d2f1
mov rcx, qword [rsp + 0x200]
mov rdx, qword [rsp + 0x1e8]
cmp rcx, 0x10
jb 0x18002d26d
test rdx, rdx
je 0x18002d8e6
jmp 0x18002d275
lea rdx, [rsp + 0x1e8]
lea rcx, str.decrypt
call qword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x18002d8e6
test ebp, ebp
je 0x18002d2c9
lea rcx, [rsp + 0x198]
cmp qword [rsp + 0x1b0], 8
cmovae rcx, qword [rsp + 0x198]
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], r12
lea r9d, [rax + 0x64]
lea r8, [0x18004bd90]
lea edx, [rax + 1]
call fcn.1800311d4
mov esi, eax
jmp 0x18002d2f1
lea rcx, [rsp + 0x198]
cmp qword [rsp + 0x1b0], 8
cmovae rcx, qword [rsp + 0x198]
xor r8d, r8d
lea edx, [r8 + 2]
call fcn.18004bbe8
mov esi, eax
and dword [rsp + 0xb8], 0xfffffe00
mov qword [rsp + 0xc0], r12
mov qword [rsp + 0xc8], r12
mov qword [rsp + 0xd0], r12
lea rax, [rsp + 0x108]
mov qword [rsp + 0xd8], rax
cmp qword [rsp + 0x200], 0x10
jb 0x18002d33e
mov rdx, qword [rsp + 0x1e8]
test rdx, rdx
je 0x18002d360
jmp 0x18002d346
lea rdx, [rsp + 0x1e8]
lea rcx, str.encrypt
call qword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x18002d360
lea rdx, [0x180097118]
jmp 0x18002d367
lea rdx, [0x180097128]
mov qword [rsp + 0x58], 7
mov qword [rsp + 0x50], r12
mov word [rsp + 0x40], r12w
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
lea rcx, [rsp + 0x38]
call fcn.180006960
nop
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x60]
call fcn.180001450
nop
mov rdx, rax
lea rcx, [rsp + 0x108]
call fcn.180055d90
mov rdi, rax
lea r8, [0x1800970de]
lea rdx, str.action
lea rcx, [rsp + 0xb0]
call fcn.180056f38
mov rcx, rax
mov rdx, rdi
call fcn.18005601c
nop
cmp qword [rsp + 0x80], 0x10
jb 0x18002d3f8
mov rcx, qword [rsp + 0x68]
call fcn.18006e998
mov qword [rsp + 0x80], socket
mov qword [rsp + 0x78], r12
mov byte [rsp + 0x68], 0
cmp qword [rsp + 0x58], 8
jb 0x18002d420
mov rcx, qword [rsp + 0x40]
call fcn.18006e998
lea rax, [rsp + 0x108]
mov qword [rsp + 0xd8], rax
lea rdx, [rsp + 0x190]
lea rcx, [rsp + 0x60]
call fcn.180001450
nop
mov rdx, rax
lea rcx, [rsp + 0x108]
call fcn.180055d90
mov rdi, rax
lea r8, [0x180097141]
lea rdx, str.file_path
lea rcx, [rsp + 0xb0]
call fcn.180056f38
mov rcx, rax
mov rdx, rdi
call fcn.18005601c
nop
cmp qword [rsp + 0x80], 0x10
jb 0x18002d492
mov rcx, qword [rsp + 0x68]
call fcn.18006e998
lea rax, [rsp + 0x108]
mov qword [rsp + 0xd8], rax
lea rax, [0x180097154]
lea rdx, [0x18009715c]
test ebp, ebp
cmovne rdx, rax
lea rcx, [rsp + 0x38]
call fcn.180003b20
nop
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x60]
call fcn.180001450
nop
mov rdx, rax
lea rcx, [rsp + 0x108]
call fcn.180055d90
mov rdi, rax
lea r8, [0x180097151]
lea rdx, str.file_type
lea rcx, [rsp + 0xb0]
call fcn.180056f38
mov rcx, rax
mov rdx, rdi
call fcn.18005601c
nop
cmp qword [rsp + 0x80], 0x10
jb 0x18002d520
mov rcx, qword [rsp + 0x68]
call fcn.18006e998
mov qword [rsp + 0x80], socket
mov qword [rsp + 0x78], r12
mov byte [rsp + 0x68], 0
cmp qword [rsp + 0x58], 8
jb 0x18002d548
mov rcx, qword [rsp + 0x40]
call fcn.18006e998
lea rax, [rsp + 0x108]
mov qword [rsp + 0xd8], rax
lea rax, [0x180096a38]
lea rdx, [0x180097170]
test esi, esi
cmovne rdx, rax
lea rcx, [rsp + 0x38]
call fcn.180003b20
nop
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x60]
call fcn.180001450
nop
mov rdx, rax
lea rcx, [rsp + 0x108]
call fcn.180055d90
mov rdi, rax
lea r8, [0x18009716f]
lea rdx, str.results
lea rcx, [rsp + 0xb0]
call fcn.180056f38
mov rcx, rax
mov rdx, rdi
call fcn.18005601c
nop
cmp qword [rsp + 0x80], 0x10
jb 0x18002d5d6
mov rcx, qword [rsp + 0x68]
call fcn.18006e998
mov qword [rsp + 0x80], socket
mov qword [rsp + 0x78], r12
mov byte [rsp + 0x68], 0
cmp qword [rsp + 0x58], 8
jb 0x18002d5fe
mov rcx, qword [rsp + 0x40]
call fcn.18006e998
mov r9d, 1
xor r8d, r8d
lea rdx, [rsp + 0xb0]
lea rcx, str.t_manual_encdec_log
call fcn.180061a50
test esi, esi
je 0x18002d783
and dword [rsp + 0x40], 0xfffffe00
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x50], r12
mov qword [rsp + 0x58], r12
lea r9, [rsp + 0x38]
lea r8, [0x18009718c]
xor edx, edx
lea rcx, [rsp + 0x60]
call fcn.18002f67c
nop
mov byte [rsp + 0x20], 0
mov r9d, 0xc8
xor r8d, r8d
mov rdx, rax
mov rcx, rbx
call fcn.18002fa44
mov dword [rsp + 0x30], 1
cmp qword [rsp + 0x80], 0x10
jb 0x18002d689
mov rcx, qword [rsp + 0x68]
call fcn.18006e998
mov qword [rsp + 0x80], socket
mov qword [rsp + 0x78], r12
mov byte [rsp + 0x68], 0
lea rcx, [rsp + 0x38]
call fcn.180055f84
nop
lea rcx, [rsp + 0xb0]
call fcn.180055f84
nop
cmp qword [rsp + 0x1b0], 8
jb 0x18002d6d0
mov rcx, qword [rsp + 0x198]
call fcn.18006e998
mov qword [rsp + 0x1b0], 7
mov qword [rsp + 0x1a8], r12
mov word [rsp + 0x198], r12w
cmp qword [rsp + 0x200], 0x10
jb 0x18002d705
mov rcx, qword [rsp + 0x1e8]
call fcn.18006e998
mov qword [rsp + 0x200], socket
mov qword [rsp + 0x1f8], r12
mov byte [rsp + 0x1e8], 0
lea rcx, [rsp + 0xe0]
call fcn.180055f84
nop
cmp qword [rsp + 0x1d8], 0x10
jb 0x18002d747
mov rcx, qword [rsp + 0x1c0]
call fcn.18006e998
mov qword [rsp + 0x1d8], socket
mov qword [rsp + 0x1d0], r12
mov byte [rsp + 0x1c0], 0
cmp qword [rsp + 0x228], 0x10
jb 0x18002d77b
mov rcx, qword [rsp + 0x210]
call fcn.18006e998
mov rax, rbx
jmp 0x18002da36
and dword [rsp + 0x40], 0xfffffe00
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x50], r12
mov qword [rsp + 0x58], r12
lea r9, [rsp + 0x38]
lea r8, str.encrypt_decrypt_failed
mov edx, 0xa
lea rcx, [rsp + 0x60]
call fcn.18002f67c
nop
mov byte [rsp + 0x20], 0
mov r9d, 0xc8
xor r8d, r8d
mov rdx, rax
mov rcx, rbx
call fcn.18002fa44
mov dword [rsp + 0x30], 1
cmp qword [rsp + 0x80], 0x10
jb 0x18002d7ec
mov rcx, qword [rsp + 0x68]
call fcn.18006e998
mov qword [rsp + 0x80], socket
mov qword [rsp + 0x78], r12
mov byte [rsp + 0x68], 0
lea rcx, [rsp + 0x38]
call fcn.180055f84
nop
lea rcx, [rsp + 0xb0]
call fcn.180055f84
nop
cmp qword [rsp + 0x1b0], 8
jb 0x18002d833
mov rcx, qword [rsp + 0x198]
call fcn.18006e998
mov qword [rsp + 0x1b0], 7
mov qword [rsp + 0x1a8], r12
mov word [rsp + 0x198], r12w
cmp qword [rsp + 0x200], 0x10
jb 0x18002d868
mov rcx, qword [rsp + 0x1e8]
call fcn.18006e998
mov qword [rsp + 0x200], socket
mov qword [rsp + 0x1f8], r12
mov byte [rsp + 0x1e8], 0
lea rcx, [rsp + 0xe0]
call fcn.180055f84
nop
cmp qword [rsp + 0x1d8], 0x10
jb 0x18002d8aa
mov rcx, qword [rsp + 0x1c0]
call fcn.18006e998
mov qword [rsp + 0x1d8], socket
mov qword [rsp + 0x1d0], r12
mov byte [rsp + 0x1c0], 0
cmp qword [rsp + 0x228], 0x10
jb 0x18002d8de
mov rcx, qword [rsp + 0x210]
call fcn.18006e998
mov rax, rbx
jmp 0x18002da36
and dword [rsp + 0x40], 0xfffffe00
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x50], r12
mov qword [rsp + 0x58], r12
lea r9, [rsp + 0x38]
lea r8, str.invalid_action
mov edx, 0x63
lea rcx, [rsp + 0x60]
call fcn.18002f67c
nop
mov byte [rsp + 0x20], 0
mov r9d, 0xc8
xor r8d, r8d
mov rdx, rax
mov rcx, rbx
call fcn.18002fa44
mov dword [rsp + 0x30], 1
cmp qword [rsp + 0x80], 0x10
jb 0x18002d94f
mov rcx, qword [rsp + 0x68]
call fcn.18006e998
mov qword [rsp + 0x80], socket
mov qword [rsp + 0x78], r12
mov byte [rsp + 0x68], 0
lea rcx, [rsp + 0x38]
call fcn.180055f84
nop
cmp qword [rsp + 0x1b0], 8
jb 0x18002d988
mov rcx, qword [rsp + 0x198]
call fcn.18006e998
mov qword [rsp + 0x1b0], 7
mov qword [rsp + 0x1a8], r12
mov word [rsp + 0x198], r12w
cmp qword [rsp + 0x200], 0x10
jb 0x18002d9bd
mov rcx, qword [rsp + 0x1e8]
call fcn.18006e998
mov qword [rsp + 0x200], socket
mov qword [rsp + 0x1f8], r12
mov byte [rsp + 0x1e8], 0
lea rcx, [rsp + 0xe0]
call fcn.180055f84
nop
cmp qword [rsp + 0x1d8], 0x10
jb 0x18002d9ff
mov rcx, qword [rsp + 0x1c0]
call fcn.18006e998
mov qword [rsp + 0x1d8], socket
mov qword [rsp + 0x1d0], r12
mov byte [rsp + 0x1c0], 0
cmp qword [rsp + 0x228], 0x10
jb 0x18002da33
mov rcx, qword [rsp + 0x210]
call fcn.18006e998
mov rax, rbx
mov rcx, qword [rsp + 0x230]
xor rcx, rsp
call fcn.18006e130
lea r11, [rsp + 0x240]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r12
pop rdi
pop rsi
ret