Function at 0x3985d3230
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x468
movaps xmmword [rsp + 0x440], xmm6
movaps xmmword [rsp + 0x450], xmm7
mov rax, qword [rsp + 0x4d0]
cmp rcx, 0xffffffffffffffff
mov qword [rsp + 0x4b0], rcx
mov qword [rsp + 0x4b8], rdx
mov qword [rsp + 0x4c0], r8
mov qword [rsp + 0x4c8], r9
mov dword [rax], 0
mov qword [rsp + 0xa0], 0
je 0x3985d3930
mov edx, 1
mov ecx, 0x400
call sub.msvcrt.dll_calloc
lea rsi, [rsp + 0xa0]
mov r9d, 0x400
mov rdx, qword [rsp + 0x4b8]
mov r13, rax
mov r8, rax
mov rcx, qword [rsp + 0x4b0]
mov qword [rsp + 0x20], rsi
mov rbx, qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
call rbx
movsxd rax, dword [r13 + 0x3c]
mov edx, 1
mov edi, dword [r13 + rax + 0x50]
mov rcx, rdi
call sub.msvcrt.dll_calloc
mov r9, rdi
mov qword [rsp + 0x20], rsi
mov rdx, qword [rsp + 0x4b8]
mov r12, rax
mov rcx, qword [rsp + 0x4b0]
mov r8, rax
call rbx
movsxd rax, dword [r12 + 0x3c]
mov r9, r12
add rax, r12
mov r8d, dword [rax + 0x88]
test r8d, r8d
je 0x3985d37b8
mov r10d, r8d
add r10, r9
mov eax, dword [r10 + 0x1c]
mov r8d, dword [r10 + 0x18]
add rax, r9
mov qword [rsp + 0x50], rax
mov eax, dword [r10 + 0x20]
test r8d, r8d
lea rbp, [rax + r9]
mov eax, dword [r10 + 0x24]
lea r14, [rax + r9]
je 0x3985d37b8
xor r8d, r8d
xor r15d, r15d
movdqa xmm7, xmmword [0x398691060]
mov qword [rsp + 0x78], 0
lea rax, [rsp + 0xa8]
movdqa xmm6, xmmword [0x398691070]
mov qword [rsp + 0x58], r9
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x90], r13
mov qword [rsp + 0x98], r12
mov qword [rsp + 0x70], r10
mov dword [rsp + 0x8c], r8d
jmp 0x3985d36cd
cmp esi, 3
je 0x3985d3910
cmp esi, 4
je 0x3985d3a0a
mov rdx, qword [rbx + 0x220]
mov rcx, qword [sym.imp.KERNEL32.dll_VirtualQuery]
mov r9d, 0x30
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x38], 0
lea r8, [rsp + 0xe0]
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
call fcn.3985d1500
test rax, rax
je 0x3985d3948
mov rax, qword [rsp + 0x4b8]
cmp qword [rsp + 0xe8], rax
je 0x3985d3880
lea r12, [rsp + 0x110]
mov r8, rax
mov ecx, 0x20
mov rdx, qword [rsp + 0x4b0]
xor eax, eax
mov rdi, r12
mov r9, r12
rep stosq qword [rdi], rax
mov rcx, qword [0x398697760]
mov dword [rdi], 0
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0x104
call fcn.3985d1500
test rax, rax
je 0x3985d3a26
lea r13, [rsp + 0x220]
xor eax, eax
mov ecx, 0x20
mov r8, qword [rsp + 0xe8]
mov rdi, r13
mov rdx, qword [rsp + 0x4b0]
mov r9, r13
rep stosq qword [rdi], rax
mov rcx, qword [0x398697760]
mov dword [rdi], 0
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0x104
call fcn.3985d1500
test rax, rax
je 0x3985d3a40
mov rax, qword [str.kernel32kernelbaFunction_detected:__s:_s__hook_type___d.text]
mov rcx, r12
mov byte [rsp + 0xbc], 0
mov rdi, qword [sym.imp.SHLWAPI.dll_StrStrIA]
lea r12, [rsp + 0x330]
mov dword [rsp + 0xb8], 0x6c6c642e
mov qword [rsp + 0xb0], rax
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x80], rax
mov rdx, rax
call rdi
test rax, rax
je 0x3985d35a0
mov rax, qword [0x398691058]
lea r12, [rsp + 0x330]
mov rcx, r13
mov dword [rsp + 0x338], 0x642e6573
mov byte [rsp + 0x33e], 0
mov rdx, r12
mov qword [rsp + 0x330], rax
mov eax, 0x6c6c
mov word [rsp + 0x33c], ax
call rdi
test rax, rax
jne 0x3985d3880
xor eax, eax
mov rdi, r12
mov r8, qword [rsp + 0xe8]
mov r9, r12
mov ecx, 0x20
mov rdx, qword [rsp + 0x4b0]
rep stosq qword [rdi], rax
mov rcx, qword [0x398697760]
mov dword [rdi], 0
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0x104
call fcn.3985d1500
test rax, rax
je 0x3985d3a5a
lea r13, [rbx + 0x11c]
mov r8d, 0x103
mov rdx, r12
mov rcx, r13
call sub.msvcrt.dll_strncpy
cmp byte [rbx + 0x11c], 0
jne 0x3985d3804
cmp qword [rsp + 0x4d8], 0
je 0x3985d3683
mov rax, qword [0x398691080]
mov dword [rsp + 0x20], esi
mov r8, r12
mov r9, qword [rsp + 0x60]
movaps xmmword [rsp + 0xb0], xmm7
mov rdx, qword [rsp + 0x80]
movaps xmmword [rsp + 0xc0], xmm6
mov rcx, qword [rsp + 0x4d8]
mov dword [rsp + 0xd8], 0xa0a20
mov qword [rsp + 0xd0], rax
call fcn.3985f4570
mov rax, qword [rsp + 0x78]
cmp rax, qword [rsp + 0x4c8]
jae 0x3985d36a7
mov rsi, qword [rsp + 0x4c0]
mov qword [rsi + rax*8], rbx
add rax, 1
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x4d0]
add dword [rax], 1
mov rax, qword [rsp + 0x70]
add r15d, 1
add r14, 2
add rbp, 4
cmp r15d, dword [rax + 0x18]
jae 0x3985d37a0
movzx eax, word [r14]
mov qword [rsp + 0xa8], 0
mov rsi, qword [rsp + 0x50]
mov rdx, qword [rsp + 0x68]
mov r13d, dword [rbp]
mov r12d, dword [rsi + rax*4]
mov rax, qword [rsp + 0x58]
add r12, rax
mov rcx, r12
call fcn.3985d2f20
cmp eax, 1
mov esi, eax
jbe 0x3985d36b2
call fcn.3985d2ac0
mov r8d, 0x103
lea rcx, [rax + 0x18]
mov rbx, rax
xor eax, eax
mov rdx, rcx
mov ecx, 0x20
mov rdi, rdx
mov qword [rsp + 0x60], rdx
mov edx, r13d
rep stosq qword [rdi], rax
mov rax, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x60]
add rdx, rax
mov dword [rdi], 0
call sub.msvcrt.dll_strncpy
mov rax, qword [rsp + 0x4b8]
mov rdi, qword [rsp + 0x50]
mov qword [rbx], rax
movzx eax, word [r14]
mov word [rbx + 8], ax
mov eax, dword [rdi + rax*4]
add rax, qword [rsp + 0x4b8]
cmp esi, 2
mov qword [rbx + 0x10], rax
jne 0x3985d33b0
mov rcx, qword [rsp + 0xa8]
movsxd rdx, dword [r12 + rcx]
lea rax, [rax + rcx + 4]
add rdx, rax
mov qword [rbx + 0x220], rdx
jmp 0x3985d33c9
mov r13, qword [rsp + 0x90]
mov r12, qword [rsp + 0x98]
mov r8d, dword [rsp + 0x8c]
cmp qword [rsp + 0x4b0], 0xffffffffffffffff
je 0x3985d37dd
mov rcx, r13
mov dword [rsp + 0x50], r8d
call sub.msvcrt.dll_free
mov rcx, r12
call sub.msvcrt.dll_free
mov r8d, dword [rsp + 0x50]
movaps xmm6, xmmword [rsp + 0x440]
mov eax, r8d
movaps xmm7, xmmword [rsp + 0x450]
add rsp, 0x468
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
xor eax, eax
mov rdi, r12
mov r8, qword [rsp + 0x4b8]
mov r9, r12
mov ecx, 0x20
mov rdx, qword [rsp + 0x4b0]
rep stosq qword [rdi], rax
mov rcx, qword [0x398697760]
mov dword [rdi], 0
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0x104
call fcn.3985d1500
test rax, rax
je 0x3985d3a74
mov rdx, r12
mov rcx, r13
call fcn.3985d3110
test eax, eax
je 0x3985d362d
nop
mov rcx, qword [sym.imp.KERNEL32.dll_GetProcessHeap]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
call fcn.3985d1500
mov rcx, qword [sym.imp.KERNEL32.dll_HeapFree]
mov r9, rbx
xor r8d, r8d
mov qword [rsp + 0x40], 0
mov rdx, rax
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
call fcn.3985d1500
jmp 0x3985d36b2
mov rdx, qword [rsp + 0xa8]
mov edx, dword [rax + rdx]
mov qword [rbx + 0x220], rdx
jmp 0x3985d33c9
movsxd rax, dword [rdx + 0x3c]
mov r9, rdx
xor r12d, r12d
xor r13d, r13d
add rax, rdx
jmp 0x3985d3319
mov rax, qword [rsp + 0x78]
cmp rax, qword [rsp + 0x4c8]
jae 0x3985d396c
mov rsi, qword [rsp + 0x4c0]
mov qword [rsi + rax*8], rbx
add rax, 1
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x4d0]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [sym.imp.KERNEL32.dll_GetProcessHeap]
add dword [rax], 1
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
call fcn.3985d1500
mov rcx, qword [sym.imp.KERNEL32.dll_HeapFree]
mov r9, rbx
xor r8d, r8d
mov qword [rsp + 0x40], 0
mov rdx, rax
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
call fcn.3985d1500
mov dword [rsp + 0x8c], 4
jmp 0x3985d36b2
mov rdx, qword [rsp + 0xa8]
mov edx, dword [rax + rdx]
mov rdx, qword [rax + rdx + 6]
mov qword [rbx + 0x220], rdx
jmp 0x3985d33c9
lea rdx, [0x398691040]
mov r8d, 0x103
mov rcx, r12
call sub.msvcrt.dll_strncpy
jmp 0x3985d349a
lea rdx, [0x398691040]
mov r8d, 0x103
mov rcx, r13
call sub.msvcrt.dll_strncpy
jmp 0x3985d350a
lea rdx, [0x398691040]
mov r8d, 0x103
mov rcx, r12
call sub.msvcrt.dll_strncpy
jmp 0x3985d3608
lea rdx, [0x398691040]
mov r8d, 0x103
mov rcx, r12
call sub.msvcrt.dll_strncpy
jmp 0x3985d386c