Function at 0x14002fb59
Capabilities:
Parse pe header
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xa8
movzx eax, word [rcx]
cmp eax, 0x5a4d
jne 0x140030174
mov rsi, rcx
mov eax, dword [rcx + 0x3c]
test eax, eax
je 0x140030174
cmp eax, 0x40
jb 0x140030189
movsxd rbp, eax
cmp rbp, rdx
ja 0x140030189
movzx eax, word [rbp + rsi + 0x18]
cmp eax, 0x20b
je 0x14002fbea
cmp eax, 0x10b
jne 0x140030174
cmp dword [rsi + rbp], 0x4550
jne 0x140030174
lea r13, [rsi + rbp]
movzx eax, word [r13 + 4]
cmp eax, 0x14c
jne 0x140030174
test byte [r13 + 0x16], 2
je 0x140030174
mov r8d, 0x138
xor eax, eax
jmp 0x14002fc21
cmp dword [rsi + rbp], 0x4550
jne 0x140030174
lea r13, [rsi + rbp]
movzx eax, word [r13 + 4]
cmp eax, 0x8664
jne 0x140030174
test byte [r13 + 0x16], 2
je 0x140030174
mov r8d, 0x148
mov eax, 1
lea rcx, [rbp - 0x40]
add rcx, r8
sub rdx, rcx
jb 0x140030189
movzx r9d, word [r13 + 6]
lea rcx, [r9*8]
lea rcx, [rcx + rcx*4]
cmp rcx, rdx
ja 0x140030189
test rax, rax
je 0x140030174
test byte [r13 + 0x17], 0x20
jne 0x140030174
cmp dword [r13 + 0xfc], 0
je 0x14002fc77
cmp dword [r13 + 0xf8], 0
jne 0x140030174
mov eax, dword [r13 + 0x28]
test rax, rax
je 0x140030174
mov qword [rsp + 0x30], r9
mov qword [rsp + 0x58], r8
mov qword [rsp + 0x50], rax
mov rax, qword [r13 + 0x30]
lea rcx, [rsp + 0x28]
mov qword [rcx], rax
mov eax, dword [r13 + 0x50]
lea rdx, [rsp + 0x90]
mov qword [rdx], rax
call fcn.14002fa9d
cmp eax, 0xb
je 0x14002fcda
lea rcx, [rsp + 0x28]
mov qword [rcx], 0
lea rdx, [rsp + 0x90]
call fcn.14002fa9d
cmp eax, 0xb
jne 0x140030174
mov r15, qword [rsp + 0x30]
movzx r12d, r15b
test r15, r15
je 0x14002fd35
mov rax, qword [rsp + 0x58]
add rax, rbp
lea rdi, [rsi + rax]
add rdi, 0xffffffffffffffd4
mov eax, r15d
shr eax, 8
lea rax, [rax + rax*4]
shl rax, 0xb
lea rcx, [r12 + r12*4]
lea rbx, [rax + rcx*8]
xor r14d, r14d
mov edx, dword [rdi + r14]
add rdx, rsi
mov ecx, dword [rdi + r14 - 8]
mov r8d, dword [rdi + r14 - 4]
add rcx, qword [rsp + 0x28]
call fcn.14005efb0
add r14, 0x28
cmp rbx, r14
jne 0x14002fd11
mov rdi, qword [rsp + 0x28]
mov rax, rdi
sub rax, qword [r13 + 0x30]
je 0x14002fddf
mov ecx, dword [r13 + 0xb0]
test rcx, rcx
je 0x14002fddf
cmp dword [r13 + 0xb4], 0
je 0x14002fddf
add rcx, rdi
mov edx, 1
mov r8d, dword [rcx + 4]
test r8, r8
je 0x14002fdcd
cmp r8d, 0xa
jb 0x14002fdd5
lea r9, [r8 - 8]
shr r9, 0x3f
add r8, r9
add r8, 0xfffffffffffffff8
sar r8, 1
cmp r8, 2
cmovl r8, rdx
xor r9d, r9d
movzx r10d, word [rcx + r9*2 + 8]
mov r11d, r10d
and r11d, 0xf000
cmp r11d, 0xa000
jne 0x14002fdbf
mov r11d, dword [rcx]
and r10d, 0xfff
add r10, r11
add qword [rdi + r10], rax
inc r9
cmp r8, r9
jne 0x14002fd95
mov r8d, dword [rcx + 4]
jmp 0x14002fdd5
cmp dword [rcx], 0
je 0x14002fdda
xor r8d, r8d
add rcx, r8
jmp 0x14002fd69
mov rdi, qword [rsp + 0x28]
cmp dword [r13 + 0x94], 0
je 0x14002ff70
mov ebx, dword [r13 + 0x90]
test rbx, rbx
je 0x14002ff70
add rbx, rdi
lea rax, [rdi + 2]
mov qword [rsp + 0x68], rax
lea r14, [rsp + 0x38]
mov qword [rsp + 0x80], r12
mov r15d, dword [rbx + 0xc]
test r15, r15
jne 0x14002fe3a
cmp dword [rbx + 0x10], 0
jne 0x14002fe3a
cmp dword [rbx], 0
jne 0x14002fe3a
cmp dword [rbx + 4], 0
jne 0x14002fe3a
cmp dword [rbx + 8], 0
je 0x14002ff66
add r15, rdi
mov rcx, r15
call fcn.140052e10
mov rcx, r14
mov rdx, r15
mov r8, rax
call fcn.14002d2a1
cmp qword [rsp + 0x38], 0
jne 0x140030174
mov rdx, qword [rsp + 0x40]
mov r8, qword [rsp + 0x48]
mov rcx, r14
call fcn.14002f8ad
cmp dword [rsp + 0x38], 0
jne 0x140030174
mov eax, dword [rbx]
mov qword [rsp + 0x88], rbx
mov r14d, dword [rbx + 0x10]
add r14, rdi
lea rbx, [rdi + rax]
test rax, rax
cmove rbx, r14
mov r12, qword [rbx]
test r12, r12
je 0x14002ff48
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x60], rax
xor r15d, r15d
test r12, r12
js 0x14002ff1a
mov rax, qword [rsp + 0x68]
cmp byte [rax + r12], 0
je 0x14002ff48
add r12, qword [rsp + 0x68]
mov rcx, r12
call fcn.140052e10
lea rcx, [rsp + 0x38]
mov rdx, r12
mov r8, rax
call fcn.14002d2a1
cmp qword [rsp + 0x38], 0
jne 0x140030174
mov r8, qword [rsp + 0x40]
mov r9, qword [rsp + 0x48]
lea rcx, [rsp + 0x70]
mov rdx, qword [rsp + 0x60]
call fcn.14002f963
cmp dword [rsp + 0x70], 0
jne 0x140030174
mov rax, qword [rsp + 0x78]
jmp 0x14002ff32
movzx edx, r12w
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.kernel32.dll_GetProcAddress]
test rax, rax
je 0x140030174
mov qword [r14 + r15], rax
mov r12, qword [rbx + r15 + 8]
add r15, 8
test r12, r12
jne 0x14002feb1
mov rbx, qword [rsp + 0x88]
add rbx, 0x14
mov r12, qword [rsp + 0x80]
lea r14, [rsp + 0x38]
jmp 0x14002fe16
mov rdi, qword [rsp + 0x28]
mov r15, qword [rsp + 0x30]
cmp dword [r13 + 0xa4], 0
je 0x14002ffe8
lea rdx, str.kernel32.dllRtlAddFunctionTable
lea r15, [rsp + 0x38]
mov r8d, 0xc
mov rcx, r15
call fcn.14002f8ad
cmp dword [r15], 0
jne 0x14002ffe3
lea r15, [rsp + 0x38]
mov rdx, qword [r15 + 8]
lea r8, [0x14006c033]
mov r9d, 0x13
mov rcx, r15
call fcn.14002f963
cmp dword [r15], 0
jne 0x14002ffe3
mov ecx, dword [r13 + 0xa0]
mov eax, dword [r13 + 0xa4]
add rcx, rdi
mov edx, 0xaaaaaaab
imul rdx, rax
shr rdx, 0x23
mov r8, rdi
call qword [rsp + 0x40]
mov r15, qword [rsp + 0x30]
test r15, r15
je 0x140030119
mov rax, qword [rsp + 0x58]
add rax, rbp
add rsi, rax
add rsi, 0xffffffffffffffcc
shr r15d, 8
lea rax, [r15 + r15*4]
shl rax, 0xb
lea rcx, [r12 + r12*4]
lea rbx, [rax + rcx*8]
xor r14d, r14d
lea rdi, [rsp + 0x38]
lea r12, [rsp + 0x98]
mov eax, dword [rsi + r14 + 4]
mov qword [rsp + 0x98], rax
test rax, rax
je 0x14003010c
mov eax, dword [rsi + r14]
add rax, qword [rsp + 0x28]
mov qword [rsp + 0xa0], rax
mov eax, dword [rsi + r14 + 0x18]
bt eax, 0x1d
jb 0x14003006d
mov ebp, 1
bt eax, 0x1e
jae 0x140030083
shr eax, 0x1f
lea ebp, [rax*2 + 2]
jmp 0x140030083
mov ebp, 0x10
bt eax, 0x1e
jae 0x140030083
shr eax, 0x1a
and eax, 0xffffffe0
add eax, 0x20
mov ebp, eax
mov r15, qword [0x14007daf8]
test r15, r15
jne 0x1400300e2
mov r8d, 9
mov rcx, rdi
lea rdx, str.ntdll.dllNtAllocateVirtualMemoryNtProtectVirtualMemory
call fcn.14002f8ad
cmp dword [rsp + 0x38], 0
jne 0x140030174
mov rdx, qword [rsp + 0x40]
mov r9d, 0x16
lea rcx, [rsp + 0x70]
lea r8, [0x14006c088]
call fcn.14002f963
cmp dword [rsp + 0x70], 0
jne 0x140030174
mov r15, qword [rsp + 0x78]
mov qword [0x14007daf8], r15
mov dword [rsp + 0x38], 0
call sub.kernel32.dll_GetCurrentProcess
mov qword [rsp + 0x20], rdi
mov rcx, rax
lea rdx, [rsp + 0xa0]
mov r8, r12
mov r9d, ebp
call r15
test eax, eax
jne 0x140030174
add r14, 0x28
cmp rbx, r14
jne 0x140030024
mov rsi, qword [rsp + 0x28]
cmp dword [r13 + 0xd4], 0
je 0x14003016a
mov eax, dword [r13 + 0xd0]
test rax, rax
mov rbx, qword [rsp + 0x50]
je 0x14003016f
mov rdi, qword [rsi + rax + 0x18]
mov rax, qword [rdi]
test rax, rax
je 0x14003016f
add rdi, 8
mov rcx, rsi
mov edx, 2
xor r8d, r8d
call rax
mov rax, qword [rdi]
add rdi, 8
test rax, rax
jne 0x14003014a
mov rsi, qword [rsp + 0x28]
jmp 0x14003016f
mov rbx, qword [rsp + 0x50]
add rsi, rbx
call rsi
nop
add rsp, 0xa8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
ud2