Function at 0x140158706
Capabilities:
Allocate or change rwx memory
Parse pe header

Disassembly:
jmp 0x1402f5370
mov byte [rsp + 0x10], dl
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x3f8
lea rbp, [rsp + 0x20]
lea rdi, [rsp + 0x20]
mov ecx, __WSAFDIsSet
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x418]
mov rax, qword [0x140516ff8]
xor rax, rbp
mov qword [rbp + 0x3c8], rax
lea rcx, [0x14054a417]
call fcn.14015817a
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov qword [rbp + 0x28], rax
cmp qword [rbp + 0x28], 0
jne 0x1402f53d7
mov al, 1
jmp 0x1402f57ab
mov rax, qword [rbp + 0x28]
mov qword [rbp + 0x48], rax
cmp qword [rbp + 0x48], 0
jne 0x1402f53ed
mov al, 1
jmp 0x1402f57ab
mov rax, qword [rbp + 0x48]
mov qword [rbp + 0x68], rax
mov rax, qword [rbp + 0x68]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x1402f540a
mov al, 1
jmp 0x1402f57ab
mov rax, qword [rbp + 0x68]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rbp + 0x48]
add rcx, rax
mov rax, rcx
mov qword [rbp + 0x88], rax
mov rax, qword [rbp + 0x88]
cmp dword [rax], 0x4550
je 0x1402f5439
mov al, 1
jmp 0x1402f57ab
mov rax, qword [rbp + 0x88]
movzx eax, word [rax + 0x14]
mov rcx, qword [rbp + 0x88]
lea rax, [rcx + rax + 0x18]
mov qword [rbp + 0xa8], rax
mov r8, qword [rbp + 0x28]
lea rdx, [rbp + 0xc8]
lea rcx, [rbp + 4]
call fcn.1402e7aa0
lea rcx, [rbp + 0xc8]
call fcn.14015571d
mov rcx, rax
call fcn.140154309
mov qword [rbp + 0xf8], rax
lea rcx, [rbp + 0xc8]
call fcn.14015571d
mov rcx, rax
call fcn.1401576d5
mov qword [rbp + 0x118], rax
mov rax, qword [rbp + 0xf8]
cmp qword [rax], 0
je 0x1402f54c8
mov rax, qword [rbp + 0x118]
cmp qword [rax], 0
je 0x1402f54c8
mov rax, qword [rbp + 0x118]
cmp qword [rax], 0xffffffffffffffff
jne 0x1402f54cf
mov al, 1
jmp 0x1402f57ab
mov rax, qword [rbp + 0xf8]
mov rax, qword [rax]
mov qword [rbp + 0x138], rax
mov rax, qword [rbp + 0x138]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x1402f5518
mov rax, qword [rbp + 0xf8]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rax, qword [rbp + 0x118]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
jmp 0x1402f57ab
mov rax, qword [rbp + 0x138]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rbp + 0xf8]
add rax, qword [rcx]
mov qword [rbp + 0x158], rax
mov rax, qword [rbp + 0x158]
cmp dword [rax], 0x4550
jne 0x1402f5573
mov rax, qword [rbp + 0x158]
mov rcx, qword [rbp + 0x88]
mov ecx, dword [rcx + 8]
cmp dword [rax + 8], ecx
jne 0x1402f5573
mov rax, qword [rbp + 0x158]
movzx eax, word [rax + 6]
mov rcx, qword [rbp + 0x88]
movzx ecx, word [rcx + 6]
cmp eax, ecx
je 0x1402f559a
mov rax, qword [rbp + 0xf8]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rax, qword [rbp + 0x118]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
jmp 0x1402f57ab
mov rax, qword [rbp + 0x158]
movzx eax, word [rax + 0x14]
mov rcx, qword [rbp + 0x158]
lea rax, [rcx + rax + 0x18]
mov qword [rbp + 0x178], rax
mov byte [rbp + 0x194], 0
mov dword [rbp + 0x1b4], 0
jmp 0x1402f55fd
mov eax, dword [rbp + 0x1b4]
inc eax
mov dword [rbp + 0x1b4], eax
mov rax, qword [rbp + 0xa8]
add rax, 0x28
mov qword [rbp + 0xa8], rax
mov rax, qword [rbp + 0x178]
add rax, 0x28
mov qword [rbp + 0x178], rax
mov rax, qword [rbp + 0x158]
movzx eax, word [rax + 6]
cmp dword [rbp + 0x1b4], eax
jge 0x1402f5784
mov rax, qword [rbp + 0xa8]
mov rdx, qword [rbp + 0x3f0]
mov rcx, rax
call fcn.140158d05
test eax, eax
jne 0x1402f5641
mov rax, qword [rbp + 0xa8]
mov eax, dword [rax + 0x24]
and eax, 0x20000000
test eax, eax
jne 0x1402f5643
jmp 0x1402f55cb
mov dword [rbp + 0x1d4], 0
jmp 0x1402f565d
mov eax, dword [rbp + 0x1d4]
inc eax
mov dword [rbp + 0x1d4], eax
mov rax, qword [rbp + 0xa8]
mov eax, dword [rax + 0x10]
cmp dword [rbp + 0x1d4], eax
jae 0x1402f577d
mov rax, qword [rbp + 0x178]
mov eax, dword [rax + 0x14]
mov rcx, qword [rbp + 0xf8]
add rax, qword [rcx]
mov ecx, dword [rbp + 0x1d4]
movzx eax, byte [rax + rcx]
mov byte [rbp + 0x1f4], al
mov rax, qword [rbp + 0xa8]
mov eax, dword [rax + 0xc]
mov rcx, qword [rbp + 0x48]
add rcx, rax
mov rax, rcx
mov ecx, dword [rbp + 0x1d4]
movzx eax, byte [rax + rcx]
movzx ecx, byte [rbp + 0x1f4]
cmp eax, ecx
jne 0x1402f56c2
jmp 0x1402f564f
movzx eax, byte [rbp + 0x3f8]
test eax, eax
je 0x1402f5771
mov dword [rbp + 0x214], 0x40
mov rax, qword [rbp + 0xa8]
mov eax, dword [rax + 0xc]
mov rcx, qword [rbp + 0x48]
add rcx, rax
mov rax, rcx
mov ecx, dword [rbp + 0x1d4]
add rax, rcx
lea r9, [rbp + 0x234]
mov r8d, dword [rbp + 0x214]
mov edx, 1
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov rax, qword [rbp + 0xa8]
mov eax, dword [rax + 0xc]
mov rcx, qword [rbp + 0x48]
add rcx, rax
mov rax, rcx
mov ecx, dword [rbp + 0x1d4]
movzx edx, byte [rbp + 0x1f4]
mov byte [rax + rcx], dl
mov rax, qword [rbp + 0xa8]
mov eax, dword [rax + 0xc]
mov rcx, qword [rbp + 0x48]
add rcx, rax
mov rax, rcx
mov ecx, dword [rbp + 0x1d4]
add rax, rcx
lea r9, [rbp + 0x214]
mov r8d, dword [rbp + 0x234]
mov edx, 1
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov byte [rbp + 0x194], 1
jmp 0x1402f564f
jmp 0x1402f5784
mov rax, qword [rbp + 0xf8]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rax, qword [rbp + 0x118]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movzx eax, byte [rbp + 0x194]
mov rdi, rax
lea rcx, [rbp - 0x20]
lea rdx, reloc.WS2_32.dll_connect
call fcn.140156eb0
mov rax, rdi
mov rcx, qword [rbp + 0x3c8]
xor rcx, rbp
call fcn.1401546d3
lea rsp, [rbp + 0x3d8]
pop rdi
pop rbp
ret