Function at 0x14003f820
Capabilities:
Enumerate files on windows
Write file on windows

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xdb0
mov qword [rsp + 0xa0], 0xfffffffffffffffe
mov qword [rsp + 0xe00], rbx
mov rax, qword [0x14012df80]
xor rax, rsp
mov qword [rsp + 0xda0], rax
mov rsi, rdx
mov r14, rcx
mov qword [rsp + 0x20], rdx
lea r9, str.lpszKeyName_s
lea r8, str.ExtraPreKickModule
lea rdx, str.CPrinter
mov rcx, qword [rcx]
call fcn.140080c70
call fcn.1400a02a0
mov r12, qword [rax + 8]
mov r13, qword [r12 + 0x140]
xor ebp, ebp
mov qword [rsp + 0x50], rbp
mov rdi, qword [r14 + 0x38]
lea rax, [rsp + 0x50]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], rdi
lea r9, str.lpszQueName_s__lpszKeyName_s__lppValue_x
lea r8, str.GetPrinterExtraData
lea rdx, str.CPrinterFunc
mov rcx, r12
call fcn.140080c70
mov ebx, ebp
xor r8d, r8d
lea rdx, [rsp + 0x60]
mov rcx, rdi
call sub.WINSPOOL.DRV_OpenPrinterW
lea r15d, [rbp + 2]
test eax, eax
je 0x14003f99d
mov dword [rsp + 0x58], ebp
mov dword [rsp + 0x48], ebp
lea rax, [rsp + 0x48]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], ebp
xor r9d, r9d
lea r8, [rsp + 0x58]
mov rdx, rsi
mov rcx, qword [rsp + 0x60]
call sub.WINSPOOL.DRV_GetPrinterDataW
mov edx, dword [rsp + 0x48]
test edx, edx
je 0x14003f993
mov eax, ebp
cmp dword [rsp + 0x58], 1
cmove eax, r15d
add edx, eax
mov dword [rsp + 0x48], edx
mov r8d, edx
mov rdi, rbp
je 0x14003f94c
lea edx, [rbp + 8]
mov rcx, qword [r13]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
mov edx, dword [rsp + 0x48]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], edx
mov r9, rdi
lea r8, [rsp + 0x58]
mov rdx, rsi
mov rcx, qword [rsp + 0x60]
call sub.WINSPOOL.DRV_GetPrinterDataW
test eax, eax
sete bl
test ebx, ebx
je 0x14003f97f
mov qword [rsp + 0x50], rdi
jmp 0x14003f993
test rdi, rdi
je 0x14003f993
mov r8, rdi
xor edx, edx
mov rcx, qword [r13]
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [rsp + 0x60]
call sub.WINSPOOL.DRV_ClosePrinter
mov dword [rsp + 0x20], ebx
lea r9, [0x1400fb428]
lea r8, str.GetPrinterExtraData
lea rdx, str.CPrinterFunc
mov rcx, r12
call fcn.140080e70
test ebx, ebx
je 0x140040139
xor edx, edx
mov r8d, 0x208
lea rcx, [rsp + 0x560]
call fcn.1400cfef0
mov r9d, 0x104
mov r8, qword [rsp + 0x50]
lea rdx, [rsp + 0xb90]
mov rcx, qword [r14 + 8]
call fcn.140013190
test eax, eax
jne 0x14003fb0a
mov rdi, qword [r14 + 0x38]
mov dword [rsp + 0x30], 0x104
lea rax, [rsp + 0x560]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
lea r9, str.lpszQueName_s__lpszPath_x__nLen_u
lea r8, str.GetPrinterDrvierVersionDirectory
lea rdx, str.CPrinterFunc
mov rcx, r12
call fcn.140080c70
mov ebx, ebp
lea rax, [0x140107838]
mov qword [rsp + 0x68], rax
mov r8d, 0xf000c
mov rdx, rdi
lea rcx, [rsp + 0x68]
call qword [0x140107870]
mov rsi, rax
test rax, rax
je 0x14003fab0
mov r9d, r15d
xor r8d, r8d
mov rdx, rax
lea rcx, [rsp + 0x68]
mov rax, qword [rsp + 0x68]
call qword [rax + 0x40]
mov rdi, rax
mov rcx, rsi
call sub.WINSPOOL.DRV_ClosePrinter
test rdi, rdi
je 0x14003faba
mov r9d, 0x104
mov r8, qword [rdi + 0x18]
lea rdx, [rsp + 0x560]
mov rcx, r13
call fcn.140013370
mov ebx, eax
mov rcx, rdi
call fcn.1400913ac
jmp 0x14003faba
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x70], eax
mov dword [rsp + 0x20], ebx
lea r9, [0x1400fb428]
lea r8, str.GetPrinterDrvierVersionDirectory
lea rdx, str.CPrinterFunc
mov rcx, r12
call fcn.140080e70
nop
test ebx, ebx
je 0x14003fb03
mov r9d, 0x104
mov r8, qword [rsp + 0x50]
lea rdx, [rsp + 0x560]
mov rcx, qword [r14 + 8]
call fcn.140012f30
mov r8, qword [rsp + 0x50]
jmp 0x14003fb5e
mov r8, qword [rsp + 0x50]
jmp 0x14003fb5e
mov edx, 0x104
lea rcx, [rsp + 0x560]
lea rax, [rsp + 0x560]
mov r8, qword [rsp + 0x50]
mov rdi, r8
sub rdi, rax
nop
nop
lea rax, [rdx + 0x7ffffefa]
test rax, rax
je 0x14003fb53
movzx eax, word [rdi + rcx]
test ax, ax
je 0x14003fb53
mov word [rcx], ax
add rcx, r15
sub rdx, 1
jne 0x14003fb30
jmp 0x14003fb58
test rdx, rdx
jne 0x14003fb5b
sub rcx, r15
mov word [rcx], bp
mov rcx, qword [r14 + 8]
test r8, r8
je 0x14003fb72
xor edx, edx
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov edi, ebp
lea rdx, [rsp + 0x300]
lea rcx, [rsp + 0x560]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140040139
mov r13d, 1
nop
test byte [rsp + 0x300], 0x10
cmove edi, r13d
lea rdx, [rsp + 0x300]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x14003fbc5
test edi, edi
je 0x14003fba0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindClose]
test edi, edi
je 0x140040139
mov rax, qword [r14 + 0x10]
mov r8, qword [rax + 0xf8]
cmp dword [r8 - 0x10], 0
cmove r8, rbp
mov dword [rsp + 0x20], 0x104
lea r9, str.tmp___.tmp
lea rdx, [rsp + 0x980]
mov rcx, qword [r14 + 8]
call fcn.140013060
lea rdx, [rsp + 0xb0]
lea rcx, [rsp + 0x980]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov r12, rax
cmp rax, 0xffffffffffffffff
je 0x14003fde5
mov rsi, rbp
lea rbx, [rsp + 0xe0]
lea rax, [rsp + 0x550]
sub rbx, rax
call fcn.1400a0754
test rax, rax
je 0x14003fc5b
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + pe_nt_image_headers64]
jmp 0x14003fc5e
mov rax, rbp
xor r9d, r9d
xor r8d, r8d
mov edx, 0x2b3d
mov rcx, qword [rax + 0x40]
call qword [sym.imp.USER32.dll_SendMessageW]
mov edx, 4
lea rax, [rsp + 0x550]
mov r8d, ebp
lea rdi, [rdx - 1]
test rdi, rdi
je 0x14003fca6
movzx ecx, word [rbx + rax]
test cx, cx
je 0x14003fca6
mov word [rax], cx
add rax, 2
mov rdx, rdi
test rdi, rdi
jne 0x14003fc83
jmp 0x14003fcab
test rdx, rdx
jne 0x14003fcb5
sub rax, 2
mov r8d, 0x8007007a
mov word [rax], 0
test r8d, r8d
jne 0x14003fd70
mov ecx, 0x7fffffff
lea rax, [0x1400fc3a8]
nop
cmp word [rax], 0
je 0x14003fce1
add rax, 2
sub rcx, r13
jne 0x14003fcd0
jmp 0x14003fcf8
test rcx, rcx
je 0x14003fcf8
mov eax, 0x7fffffff
sub rax, rcx
mov qword [rsp + 0x90], rax
jmp 0x14003fd03
mov rax, rbp
mov qword [rsp + 0x90], rax
movsxd r8, eax
lea rdx, [rsp + 0x550]
lea rcx, [0x1400fc3a8]
call fcn.1400ce2c0
test eax, eax
jne 0x14003fd3b
lea r8d, [rax + 0x10]
lea rdx, [rsp + 0x98]
lea rcx, [rsp + 0x550]
call fcn.1400cf260
mov edi, eax
jmp 0x14003fd4b
lea rcx, [rsp + 0x550]
call fcn.1400cf2a0
mov rdi, rax
call fcn.1400cf300
cmp dword [rax], 0x22
je 0x14003fd70
call fcn.1400cf300
cmp dword [rax], 0x16
je 0x14003fd70
cmp edi, 0x80000000
je 0x14003fd70
cmp rsi, rdi
jge 0x14003fd70
lea rsi, [rdi + 1]
lea rdx, [rsp + 0xb0]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x14003fc43
mov r9, rsi
lea r8, str.tmp_03d.tmp
mov edx, 0x104
lea rcx, [rsp + 0x770]
call fcn.14000ff40
mov rdx, qword [r14 + 0x10]
mov r8, qword [rdx + 0xf8]
cmp dword [r8 - 0x10], 0
cmove r8, rbp
mov dword [rsp + 0x20], 0x104
lea r9, [rsp + 0x770]
lea rdx, [rsp + 0x980]
mov rcx, qword [r14 + 8]
call fcn.140013060
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x14003fe36
xor r9d, r9d
lea r8, str.tmp_03d.tmp
mov edx, 0x104
lea rcx, [rsp + 0x770]
call fcn.14000ff40
mov rdx, qword [r14 + 0x10]
mov r8, qword [rdx + 0xf8]
cmp dword [r8 - 0x10], 0
cmove r8, rbp
mov dword [rsp + 0x20], 0x104
lea r9, [rsp + 0x770]
lea rdx, [rsp + 0x980]
mov rcx, qword [r14 + 8]
call fcn.140013060
call fcn.14009d5e8
mov rdx, rax
mov ecx, ebp
test rax, rax
setne cl
test ecx, ecx
jne 0x14003fe55
mov ecx, 0x80004005
call fcn.1400034f0
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
add rax, 0x18
mov qword [rsp + 0x40], rax
lea r12, [0x140100878]
or rsi, 0xffffffffffffffff
test r12, 0xffffffffffff0000
jne 0x14003fe9d
movzx edi, r12w
mov ecx, edi
call fcn.1400a1868
test rax, rax
je 0x14003febd
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.14000a990
jmp 0x14003febd
xor eax, eax
mov rcx, rsi
mov rdi, r12
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
mov rdx, r12
lea rcx, [rsp + 0x40]
call fcn.140003940
nop
lea r9, [0x14010087c]
lea r8, [0x1401011b0]
lea rdx, str._s_s
lea rcx, [rsp + 0x40]
call fcn.1400037a0
call fcn.1400a0754
test rax, rax
je 0x14003fef4
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + pe_nt_image_headers64]
jmp 0x14003fef7
mov rax, rbp
xor r9d, r9d
xor r8d, r8d
mov edx, 0x2b3f
mov rcx, qword [rax + 0x40]
call qword [sym.imp.USER32.dll_SendMessageW]
mov r8, rax
lea rdx, [0x1400fb428]
lea rcx, [rsp + 0x40]
call fcn.1400037a0
mov r9, r12
lea r8, [0x1400fdbc8]
lea rdx, str._s_s
lea rcx, [rsp + 0x40]
call fcn.1400037a0
lea r9, [0x1400fdbc8]
lea r8, [0x1401011b8]
lea rdx, str._s_s
lea rcx, [rsp + 0x40]
call fcn.1400037a0
mov qword [rsp + 0x30], rbp
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], r15d
xor r9d, r9d
mov r8d, r13d
mov edx, 0x40000000
lea rcx, [rsp + 0x770]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x14004011b
mov rdx, qword [rsp + 0x40]
test rdx, rdx
je 0x14003ffef
mov edi, 0x3fffffff
mov rax, rdi
mov rcx, rdx
mov r8d, ebp
nop
nop
cmp word [rcx], r8w
je 0x14003ffc2
add rcx, 2
sub rax, 1
jne 0x14003ffb0
jmp 0x14003ffc7
test rax, rax
jne 0x14003ffda
mov r8d, 0x80070057
mov rdi, rbp
mov qword [rsp + 0x88], rbp
jmp 0x14003ffe5
sub rdi, rax
mov qword [rsp + 0x88], rdi
test r8d, r8d
js 0x14003fff5
add rdi, rdi
jmp 0x14003fff8
mov r8d, 0x80070057
mov rdi, rbp
test r8d, r8d
jns 0x140040007
mov rdi, rbp
mov qword [rsp + 0x78], rbp
jmp 0x140040010
add rdi, 2
mov qword [rsp + 0x78], rdi
cmp dword [rdx - 8], 1
jle 0x140040028
mov edx, dword [rdx - 0x10]
lea rcx, [rsp + 0x40]
call fcn.140003570
mov rdx, qword [rsp + 0x40]
mov qword [rsp + 0x20], rbp
lea r9, [rsp + 0x80]
mov r8d, edi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea r9, [0x1401011bc]
mov r8, r12
lea rdx, str._s_s
lea rcx, [rsp + 0x40]
call fcn.14000a800
lea r9, [rsp + 0x770]
lea r8, [0x14010087c]
lea rdx, str._s_s
lea rcx, [rsp + 0x40]
call fcn.1400037a0
mov qword [rsp + 0x20], rbp
xor r9d, r9d
mov rdi, qword [rsp + 0x40]
mov r8, rdi
lea rdx, [rsp + 0x560]
mov rcx, qword [r14 + 8]
call fcn.140014b80
mov rbx, rax
test rax, rax
je 0x140040120
call fcn.1400a0754
test rax, rax
je 0x1400400c7
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + pe_nt_image_headers64]
mov rbp, rax
xor r9d, r9d
mov r8, r13
mov edx, 0x2b3f
mov rcx, qword [rbp + 0x40]
call qword [sym.imp.USER32.dll_SendMessageW]
mov rbp, rax
nop
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x140040110
xor r9d, r9d
xor r8d, r8d
mov edx, 0x2b3d
mov rcx, rbp
call qword [sym.imp.USER32.dll_SendMessageW]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x1400400e0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140040120
mov rdi, qword [rsp + 0x40]
lea rdx, [rdi - 0x18]
lock xadd dword [rdx + 0x10], esi
add esi, 0xffffffff
test esi, esi
jg 0x140040139
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rcx, qword [rsp + 0xda0]
xor rcx, rsp
call fcn.1400cd6e0
mov rbx, qword [rsp + 0xe00]
add rsp, 0xdb0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret