Function at 0x40097cc
Capabilities:
Set current directory

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x8c0
mov rax, qword [0x0400c1b0]
xor rax, rsp
mov qword [rsp + 0x8b0], rax
mov rbp, rcx
mov r13d, r8d
mov rsi, rdx
lea rcx, [rsp + 0x492]
xor r14d, r14d
xor edx, edx
mov r8d, 0x206
mov word [rsp + 0x490], r14w
call fcn.0400a4d6
lea rcx, [rsp + 0x292]
xor edx, edx
mov r8d, 0x1fe
mov word [rsp + 0x290], r14w
call fcn.0400a4d6
lea r8d, [r14 + 0x28]
lea rcx, [rsp + 0x50]
xor edx, edx
mov qword [rsp + 0x48], r14
call fcn.0400a4d6
mov r12, r14
cmp rbp, r14
je 0x4009b67
cmp rsi, r14
je 0x4009b67
mov rdi, qword [rbp + 0x20]
mov ebx, r14d
jmp 0x4009885
mov rcx, qword [rdi]
mov rdx, rsi
call qword [sym.imp.msvcrt.dll_wcsstr]
cmp rax, r14
jne 0x400988f
mov rdi, qword [rdi + 8]
cmp rdi, r14
jne 0x4009870
jmp 0x4009b6a
mov rcx, qword [rdi]
mov edx, 0x5c
call qword [sym.imp.msvcrt.dll_wcsrchr]
mov r11, rax
cmp rax, r14
je 0x4009b6a
lea rax, [rsp + 0x490]
mov r15d, 0x104
mov r8, r11
sub r8, rax
mov rdx, r15
lea rcx, [rsp + 0x490]
lea rax, [rdx + 0x7ffffefa]
cmp rax, r14
je 0x40098ed
movzx eax, word [r8 + rcx + 2]
cmp ax, r14w
je 0x40098ed
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x40098c8
cmp rdx, r14
jne 0x40098f6
sub rcx, 2
mov word [rcx], r14w
mov r8, qword [rdi]
sub r11, r8
add r11, 2
sar r11, 1
cmp r11, 0x7ffffffe
jbe 0x400991b
mov word [rsp + 0x290], r14w
jmp 0x4009962
lea rdx, [rsp + 0x290]
mov ecx, 0x100
lea rax, [rsp + 0x290]
sub r8, rdx
cmp r11, r14
je 0x4009955
movzx edx, word [r8 + rax]
cmp dx, r14w
je 0x4009955
dec rcx
mov word [rax], dx
dec r11
add rax, 2
cmp rcx, r14
jne 0x4009933
cmp rcx, r14
jne 0x400995e
sub rax, 2
mov word [rax], r14w
cmp r13d, r14d
je 0x40099c4
lea rax, [rsp + 0x490]
lea rbp, [rsp + 0x48]
mov qword [rsp + 0x58], rax
mov rax, qword [rdi]
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0x290]
mov qword [rsp + 0x50], rax
call fcn.0400845c
mov r12, rax
cmp rax, r14
je 0x4009b48
call fcn.04008658
mov qword [rsp + 0x60], rax
cmp rax, r14
je 0x4009b26
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp eax, r14d
je 0x4009b26
lea r8, [rsp + 0x490]
lea rdx, [rsp + 0x290]
mov rcx, rbp
call fcn.04009618
mov ebx, eax
cmp r13d, r14d
je 0x4009b6a
cmp eax, r14d
je 0x4009b26
mov ebx, 0x206
lea rcx, [rsp + 0x82]
xor edx, edx
mov r8, rbx
mov word [rsp + 0x80], r14w
call fcn.0400a4d6
lea rcx, [rsp + 0x6a2]
mov r8, rbx
xor edx, edx
mov word [rsp + 0x6a0], r14w
call fcn.0400a4d6
mov rdx, qword [rsp + 0x60]
lea rax, [rsp + 0x80]
sub rdx, rax
mov dword [rsp + 0x40], r15d
movzx esi, r14w
mov r8, r15
lea rcx, [rsp + 0x80]
lea rax, [r8 + 0x7ffffefa]
cmp rax, r14
je 0x4009a72
movzx eax, word [rdx + rcx]
cmp ax, r14w
je 0x4009a72
mov word [rcx], ax
add rcx, 2
sub r8, 1
jne 0x4009a4f
cmp r8, r14
jne 0x4009a7b
sub rcx, 2
mov word [rcx], r14w
lea r8, [0x040012b4]
lea rcx, [rsp + 0x80]
mov rdx, r15
call fcn.04008880
lea r8, [rsp + 0x490]
lea rcx, [rsp + 0x80]
mov rdx, r15
call fcn.04008880
lea rcx, [rsp + 0x80]
call qword [sym.imp.msvcrt.dll__wcslwr]
lea rdx, [0x040012e0]
lea rcx, [rsp + 0x80]
call qword [sym.imp.msvcrt.dll_wcsstr]
mov rdi, rax
cmp rax, r14
je 0x4009ae4
add rdi, 8
mov si, word [rdi]
mov word [rdi], r14w
lea rax, [rsp + 0x40]
lea rdx, [rsp + 0x80]
xor r9d, r9d
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x6a0]
xor r8d, r8d
mov qword [rsp + 0x28], rax
xor ecx, ecx
mov qword [rsp + 0x20], r14
call sub.WINSPOOL.DRV_UploadPrinterDriverPackageW
mov ebx, r14d
cmp eax, r14d
setge bl
cmp rdi, r14
je 0x4009b26
mov word [rdi], si
cmp r12, r14
je 0x4009b48
cmp ebx, r14d
je 0x4009b3f
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
neg eax
sbb ecx, ecx
and ebx, ecx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov rcx, qword [rbp + 0x18]
cmp rcx, r14
je 0x4009b6a
mov edx, 6
call fcn.04008ac4
mov rcx, qword [rbp + 0x18]
call qword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x4009b6a
mov ebx, r14d
mov eax, ebx
mov rcx, qword [rsp + 0x8b0]
xor rcx, rsp
call fcn.0400a4b0
mov rbx, qword [rsp + 0x910]
add rsp, 0x8c0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret