Function at 0x140002220
Capabilities:
Enumerate pe sections
Get common file path
Parse pe header
Read file on windows
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 8], rcx
push rsi
push rdi
mov eax, 0x1558
call fcn.1400895e0
sub rsp, rax
mov rax, qword [0x1400b8080]
xor rax, rsp
mov qword [rsp + 0x1540], rax
mov rax, qword [rsp + 0x1570]
cmp dword [rax + 0x14], 0
je 0x14000225b
xor eax, eax
jmp 0x140002e76
mov rax, qword [rsp + 0x1570]
mov eax, dword [rax + 0x10]
and eax, 1
test eax, eax
je 0x1400024db
mov rax, qword [rsp + 0x1570]
cmp dword [rax + 0x18], 6
jb 0x1400024db
mov rax, qword [rsp + 0x1570]
cmp dword [rax + 0x1c], 1
jb 0x1400024db
mov dword [rsp + 0x70], recv
mov dword [rsp + 0x158], 0
mov edx, 0x104
lea rcx, [rsp + 0x220]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea rcx, [0x14009b878]
call fcn.14001a9f0
lea rdx, str.ZwQuerySystemInformation
mov rcx, rax
call fcn.14001aa60
mov qword [rsp + 0xc8], rax
cmp qword [rsp + 0xc8], 0
jne 0x1400022f3
mov eax, 1
jmp 0x140002e76
mov rax, qword [rsp + 0xc8]
mov qword [rsp + 0x118], rax
mov eax, dword [rsp + 0x70]
lea r9, [rsp + 0x158]
xor r8d, r8d
xor edx, edx
mov ecx, eax
call qword [rsp + 0x118]
cmp dword [rsp + 0x158], 0
jne 0x140002331
mov eax, 1
jmp 0x140002e76
mov eax, dword [rsp + 0x158]
mov edx, eax
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov qword [rsp + 0xd8], rax
mov rax, qword [rsp + 0xc8]
mov qword [rsp + 0x120], rax
mov eax, dword [rsp + 0x70]
lea r9, [rsp + 0x158]
mov r8d, dword [rsp + 0x158]
mov rdx, qword [rsp + 0xd8]
mov ecx, eax
call qword [rsp + pe_nt_image_headers64]
mov dword [rsp + 0xb0], eax
cmp dword [rsp + 0xb0], 0
je 0x14000239d
mov eax, 1
jmp 0x140002e76
mov rax, qword [rsp + 0xd8]
mov qword [rsp + 0x58], rax
lea rax, str.SystemRoot_system32_
mov qword [rsp + 0x108], rax
mov rax, qword [rsp + 0x108]
mov qword [rsp + 0x128], rax
mov qword [rsp + 0xa0], 0xffffffffffffffff
inc qword [rsp + 0xa0]
mov rax, qword [rsp + 0x128]
mov rcx, qword [rsp + 0xa0]
cmp byte [rax + rcx], 0
jne 0x1400023d5
mov rax, qword [rsp + 0xa0]
mov qword [rsp + 0x100], rax
mov qword [rsp + 0xd0], 0
jmp 0x140002431
mov rax, qword [rsp + 0xd0]
inc rax
mov qword [rsp + 0xd0], rax
mov rax, qword [rsp + 0x58]
inc rax
mov qword [rsp + 0x58], rax
mov eax, dword [rsp + 0x158]
sub rax, qword [rsp + 0x100]
cmp qword [rsp + 0xd0], rax
jae 0x14000246d
mov r8, qword [rsp + 0x100]
mov rdx, qword [rsp + 0x108]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x14000246b
jmp 0x14000246d
jmp 0x140002411
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x1570]
add rax, 0x3c
lea rdx, [rsp + 0x220]
mov rcx, rax
call fcn.140003c70
mov rax, qword [rsp + 0x1570]
add rax, 0x3c
lea rdx, [0x14009b8a8]
mov rcx, rax
call fcn.140003ca0
mov rax, qword [rsp + 0x1570]
add rax, 0x3c
mov rdx, qword [rsp + 0x58]
mov rcx, rax
call fcn.140003ca0
mov rcx, qword [rsp + 0xd8]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rax, qword [rsp + 0x1570]
mov eax, dword [rax + 0x10]
and eax, 2
test eax, eax
je 0x14000268d
mov edx, 8
mov rax, qword [rsp + 0x1570]
mov rcx, qword [rax + 8]
call qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x14000268d
mov rax, qword [rsp + 0x1570]
mov rax, qword [rax + 8]
mov qword [rsp + 0xe0], rax
cmp qword [rsp + 0xe0], 0
je 0x140002541
mov rax, qword [rsp + 0xe0]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x14000254b
mov eax, 2
jmp 0x140002e76
mov rcx, qword [rsp + 0xe0]
call qword [sym.imp.imagehlp.dll_ImageNtHeader]
mov qword [rsp + 0x78], rax
cmp qword [rsp + 0x78], 0
je 0x140002573
mov rax, qword [rsp + 0x78]
cmp dword [rax], 0x4550
je 0x14000257d
mov eax, 2
jmp 0x140002e76
mov rax, qword [rsp + 0x78]
movzx eax, word [rax + 0x14]
mov rcx, qword [rsp + 0x78]
lea rax, [rcx + rax + 0x18]
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x1570]
add rax, 0x140
mov rcx, rax
call fcn.140003780
mov qword [rsp + 0xe8], 0
jmp 0x1400025cc
mov rax, qword [rsp + 0xe8]
inc rax
mov qword [rsp + 0xe8], rax
mov rax, qword [rsp + 0x78]
movzx eax, word [rax + 6]
cmp qword [rsp + 0xe8], rax
jae 0x14000268d
mov rax, qword [rsp + 0x60]
mov eax, dword [rax + 0x24]
and eax, 0x40000000
test eax, eax
je 0x14000267a
mov rax, qword [rsp + 0x60]
mov eax, dword [rax + 0x24]
and eax, 0x80000000
test eax, eax
jne 0x14000267a
mov rax, qword [rsp + 0x60]
mov eax, dword [rax + 0xc]
mov rcx, qword [rsp + 0x1570]
add rax, qword [rcx + 8]
mov qword [rsp + 0x160], rax
mov rax, qword [rsp + 0x60]
mov eax, dword [rax + 8]
mov dword [rsp + 0x168], eax
mov edx, dword [rsp + 0x168]
mov rcx, qword [rsp + 0x160]
call fcn.140019b30
mov dword [rsp + 0x16c], eax
mov rax, qword [rsp + 0x1570]
add rax, 0x140
mov qword [rsp + 0x130], rax
lea rdx, [rsp + 0x160]
mov rcx, qword [rsp + 0x130]
call fcn.140003820
mov rax, qword [rsp + 0x60]
add rax, 0x28
mov qword [rsp + 0x60], rax
jmp 0x1400025b9
mov rax, qword [rsp + 0x1570]
mov eax, dword [rax + 0x10]
and eax, 4
test eax, eax
je 0x140002e66
mov rax, qword [rsp + 0x1570]
cmp dword [rax + 0x20], 0
je 0x14000274d
lea rcx, [0x14009b8d0]
call fcn.14001a9f0
lea rdx, str.ZwQueryInformationProcess
mov rcx, rax
call fcn.14001aa60
mov rcx, qword [rsp + 0x1570]
mov qword [rcx + 0x158], rax
mov rax, qword [rsp + 0x1570]
cmp qword [rax + 0x158], 0
jne 0x1400026fb
mov eax, 4
jmp 0x140002e76
lea rcx, [0x14009b8e8]
call fcn.14001a9f0
mov qword [rsp + 0x138], rax
mov rax, qword [rsp + 0x1570]
mov rax, qword [rax + 0x158]
mov qword [rsp + 0x140], rax
mov rax, qword [rsp + 0x138]
mov rcx, qword [rsp + 0x140]
sub rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x1570]
mov qword [rcx + 0x158], rax
jmp 0x14000274e
int3
mov dword [rsp + 0x40], 0
mov rax, qword [rsp + 0x1570]
cmp dword [rax + 0x20], 0
je 0x1400028c5
lea rcx, [0x14009b900]
call fcn.14001a9f0
lea rcx, [rsp + 0x540]
mov rdi, rcx
mov rsi, rax
mov ecx, 0x1000
rep movsb byte [rdi], byte [rsi]
lea rax, [rsp + 0x540]
mov qword [rsp + 0xf0], rax
mov rax, qword [rsp + 0xf0]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x1400027b5
mov eax, 6
jmp 0x140002e76
mov rax, qword [rsp + 0xf0]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0xf0]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0xa8], rax
mov rax, qword [rsp + 0xa8]
cmp dword [rax], 0x4550
je 0x1400027f1
mov eax, 6
jmp 0x140002e76
mov rax, qword [rsp + 0xa8]
movzx eax, word [rax + 0x14]
mov rcx, qword [rsp + 0xa8]
lea rax, [rax + rcx + 0x18]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0xf8], 0
jmp 0x140002830
mov rax, qword [rsp + 0xf8]
inc rax
mov qword [rsp + 0xf8], rax
mov rax, qword [rsp + 0xa8]
movzx eax, word [rax + 6]
cmp qword [rsp + 0xf8], rax
jae 0x140002894
mov rax, qword [rsp + 0x48]
mov eax, dword [rax + 0xc]
mov rcx, qword [rsp + 0x1570]
cmp rax, qword [rcx + 0x158]
ja 0x140002884
mov rax, qword [rsp + 0x48]
mov eax, dword [rax + 0xc]
mov rcx, qword [rsp + 0x48]
add eax, dword [rcx + 8]
mov eax, eax
mov rcx, qword [rsp + 0x1570]
cmp qword [rcx + 0x158], rax
ja 0x140002884
jmp 0x140002894
mov rax, qword [rsp + 0x48]
add rax, 0x28
mov qword [rsp + 0x48], rax
jmp 0x14000281d
mov rax, qword [rsp + 0x48]
mov eax, dword [rax + 0xc]
mov rcx, qword [rsp + 0x1570]
mov rcx, qword [rcx + 0x158]
sub rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x48]
mov ecx, dword [rcx + 0x14]
add rax, rcx
mov dword [rsp + 0x40], eax
jmp 0x140002a00
lea rcx, [0x14009b918]
call fcn.14001a9f0
mov qword [rsp + 0xb8], rax
mov rax, qword [rsp + 0xb8]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x1400028f5
mov eax, 6
jmp 0x140002e76
mov rax, qword [rsp + 0xb8]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0xb8]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x88], rax
mov rax, qword [rsp + 0x88]
cmp dword [rax], 0x4550
je 0x140002931
mov eax, 6
jmp 0x140002e76
mov rax, qword [rsp + 0x88]
movzx eax, word [rax + 0x14]
mov rcx, qword [rsp + 0x88]
lea rax, [rax + rcx + 0x18]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0xc0], 0
jmp 0x140002970
mov rax, qword [rsp + 0xc0]
inc rax
mov qword [rsp + 0xc0], rax
mov rax, qword [rsp + 0x88]
movzx eax, word [rax + 6]
cmp qword [rsp + 0xc0], rax
jae 0x1400029d4
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0xc]
mov rcx, qword [rsp + 0x1570]
cmp rax, qword [rcx + 0x158]
ja 0x1400029c4
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0xc]
mov rcx, qword [rsp + 0x50]
add eax, dword [rcx + 8]
mov eax, eax
mov rcx, qword [rsp + 0x1570]
cmp qword [rcx + 0x158], rax
ja 0x1400029c4
jmp 0x1400029d4
mov rax, qword [rsp + 0x50]
add rax, 0x28
mov qword [rsp + 0x50], rax
jmp 0x14000295d
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0xc]
mov rcx, qword [rsp + 0x1570]
mov rcx, qword [rcx + 0x158]
sub rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x50]
mov ecx, dword [rcx + 0x14]
add rax, rcx
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0
jne 0x140002a11
mov eax, 6
jmp 0x140002e76
lea rax, [rsp + 0x330]
mov rdi, rax
xor eax, eax
mov ecx, 0x208
rep stosb byte [rdi], al
mov edx, 0x104
lea rcx, [rsp + 0x330]
call fcn.14001ac70
lea rdx, str._ntdll.dll
lea rcx, [rsp + 0x330]
call fcn.140003cd0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, 1
mov edx, 0x80000000
lea rcx, [rsp + 0x330]
call fcn.14001b020
mov qword [rsp + 0x90], rax
cmp qword [rsp + 0x90], 0xffffffffffffffff
jne 0x140002a9c
mov eax, 3
jmp 0x140002e76
mov r9d, 1
xor r8d, r8d
mov edx, dword [rsp + 0x40]
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x170]
mov r8d, 0x64
lea rdx, [rsp + 0x1b0]
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, qword [rsp + 0x90]
call fcn.14001b3d0
lea rax, [rsp + 0x1b0]
mov qword [rsp + 0x80], rax
xor eax, eax
cmp eax, 1
je 0x140002ba5
mov rax, qword [rsp + 0x1570]
mov r8d, dword [rax + 0x20]
lea rdx, [rsp + 0x178]
mov rcx, qword [rsp + 0x80]
call fcn.14001b890
mov eax, eax
mov qword [rsp + 0x110], rax
cmp qword [rsp + 0x110], 5
jne 0x140002b82
mov eax, 1
imul rax, rax, 0
mov rcx, qword [rsp + 0x80]
movzx eax, byte [rcx + rax]
cmp eax, 0xb8
jne 0x140002b82
mov eax, 1
imul rax, rax, 1
mov rcx, qword [rsp + 0x1570]
mov rdx, qword [rsp + 0x80]
mov eax, dword [rdx + rax]
mov dword [rcx + 0x160], eax
jmp 0x140002ba5
mov rax, qword [rsp + 0x110]
mov rcx, qword [rsp + 0x80]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x80], rax
jmp 0x140002b01
mov byte [rsp + 0x198], 0xb8
mov byte [rsp + 0x199], 0
mov byte [rsp + 0x19a], 0
mov byte [rsp + 0x19b], 0
mov byte [rsp + 0x19c], 0
mov byte [rsp + 0x19d], 0xe8
mov byte [rsp + 0x19e], 3
mov byte [rsp + 0x19f], 0
mov byte [rsp + 0x1a0], 0
mov byte [rsp + 0x1a1], 0
mov byte [rsp + 0x1a2], Ordinal_200
mov byte [rsp + 0x1a3], reloc.WS2_32.dll_sendto
mov byte [rsp + 0x1a4], 0
mov byte [rsp + 0x1a5], Ordinal_143
mov byte [rsp + 0x1a6], SHAnsiToUnicode
mov byte [rsp + 0x1a7], reloc.WS2_32.dll_ntohs
mov byte [rsp + 0x1a8], gethostname
mov byte [rsp + 0x1a9], Ordinal_200
mov byte [rsp + 0x188], 0xb8
mov byte [rsp + 0x189], 0
mov byte [rsp + 0x18a], 0
mov byte [rsp + 0x18b], 0
mov byte [rsp + 0x18c], 0
mov byte [rsp + 0x18d], Ordinal_79
mov byte [rsp + 0x18e], Ordinal_143
mov byte [rsp + 0x18f], SHAnsiToUnicode
mov byte [rsp + 0x190], reloc.WS2_32.dll_ntohs
mov byte [rsp + 0x191], 5
mov byte [rsp + 0x192], Ordinal_200
mov rax, qword [rsp + 0x1570]
mov eax, dword [rax + 0x2c]
mov dword [rsp + 0x20], 0x40
mov r9d, 0x1000
mov r8d, eax
xor edx, edx
mov rcx, 0xffffffffffffffff
call fcn.14001a780
mov rcx, qword [rsp + 0x1570]
mov qword [rcx + 0x30], rax
mov rax, qword [rsp + 0x1570]
cmp qword [rax + 0x30], 0
jne 0x140002cdc
mov eax, 5
jmp 0x140002e76
call fcn.14001ac10
mov ecx, eax
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_srand]
mov rax, qword [rsp + 0x1570]
mov rax, qword [rax + 0x30]
mov qword [rsp + 0x148], rax
mov qword [rsp + 0x98], 0
jmp 0x140002d1e
mov rax, qword [rsp + 0x98]
inc rax
mov qword [rsp + 0x98], rax
mov rax, qword [rsp + 0x1570]
mov eax, dword [rax + 0x2c]
cmp qword [rsp + 0x98], rax
jae 0x140002d5b
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
cdqe
and rax, 0xff
mov rcx, qword [rsp + 0x98]
mov rdx, qword [rsp + 0x148]
add rdx, rcx
mov rcx, rdx
mov byte [rcx], al
jmp 0x140002d0b
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
cdqe
mov rcx, qword [rsp + 0x1570]
mov ecx, dword [rcx + 0x2c]
sub rcx, 0x1d
xor edx, edx
div rcx
mov rax, rdx
mov qword [rsp + 0x150], rax
mov eax, 1
imul rax, rax, 1
mov rcx, qword [rsp + 0x1570]
mov ecx, dword [rcx + 0x160]
mov dword [rsp + rax + 0x198], ecx
mov eax, 1
imul rax, rax, 1
mov rcx, qword [rsp + 0x1570]
mov ecx, dword [rcx + 0x160]
mov dword [rsp + rax + 0x188], ecx
mov rax, qword [rsp + 0x1570]
mov rax, qword [rax + 0x30]
add rax, qword [rsp + 0x150]
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0x1570]
mov rcx, qword [rsp + 0x68]
mov qword [rax + 0x168], rcx
lea rax, [rsp + 0x198]
mov rdi, qword [rsp + 0x68]
mov rsi, rax
mov ecx, reloc.WS2_32.dll_select
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x68]
add rax, 0x12
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0x1570]
mov rcx, qword [rsp + 0x68]
mov qword [rax + 0x170], rcx
lea rax, [rsp + 0x188]
mov rdi, qword [rsp + 0x68]
mov rsi, rax
mov ecx, listen
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x1570]
mov edx, dword [rax + 0x2c]
mov rax, qword [rsp + 0x1570]
mov rcx, qword [rax + 0x30]
call fcn.140019b30
mov rcx, qword [rsp + 0x1570]
mov dword [rcx + 0x38], eax
xor eax, eax
jmp 0x140002e76
mov rax, qword [rsp + 0x1570]
mov eax, dword [rax + 0x10]
and eax, 8
xor eax, eax
mov rcx, qword [rsp + 0x1540]
xor rcx, rsp
call fcn.1400889e0
add rsp, 0x1558
pop rdi
pop rsi
ret