Function at 0x140054220
Capabilities:
Get system information on windows
Parse pe header

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r13
push r15
sub rsp, 0x70
mov rax, qword [0x140112070]
xor rax, rsp
mov qword [rsp + 0x60], rax
xor ebp, ebp
mov eax, 0x5a4d
cmp word [0x140153690], ax
mov ebx, ebp
mov esi, ebp
jne 0x14005485c
movsxd rcx, dword [0x1401536cc]
lea rax, [rcx + 0x108]
cmp rax, 0x26a400
jbe 0x14005427d
lea ecx, [rbp + 0xd]
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140054464
lea r13, [0x140153690]
cmp dword [rcx + r13], 0x4550
lea r15, [rcx + r13]
jne 0x14005485c
mov eax, 0x8664
cmp word [r15 + 4], ax
jne 0x14005485c
mov eax, dword [r15 + 0x38]
test al, 1
jne 0x14005485c
movzx ecx, word [r15 + 0x14]
mov r9d, eax
movzx eax, word [r15 + 6]
add rcx, 0x24
cmp bp, ax
jae 0x1400542f5
add rcx, r15
mov r8d, eax
nop
mov eax, dword [rcx + 4]
mov edx, dword [rcx]
test eax, eax
jne 0x1400542df
lea rax, [r9 + rdx]
jmp 0x1400542e1
add eax, edx
cmp rax, rbx
cmovbe rax, rbx
add rcx, 0x28
mov rbx, rax
sub r8, 1
jne 0x1400542d0
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov edx, dword [rsp + 0x34]
mov eax, dword [r15 + 0x50]
lea rdi, [rdx - 1]
add rdi, rax
lea rcx, [rdx - 1]
not rcx
lea rax, [rdx - 1]
add rax, rbx
and rdi, rcx
and rax, rcx
cmp rdi, rax
jne 0x14005485c
mov rcx, qword [r15 + 0x30]
mov r9d, 4
mov r8d, 0x3000
mov qword [rsp + 0xa8], r14
mov rdx, rdi
mov qword [rsp + 0x20], rbp
call sub.KERNEL32.dll_VirtualAlloc
mov r14, rax
test rax, rax
jne 0x14005438a
lea r9d, [rax + 4]
mov qword [rsp + 0x20], rbp
mov r8d, 0x3000
mov rdx, rdi
xor ecx, ecx
call sub.KERNEL32.dll_VirtualAlloc
mov r14, rax
test rax, rax
jne 0x14005438a
lea ecx, [rax + 0xe]
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x14005445c
mov qword [rsp + 0xa0], r12
lea rcx, [r14 + rdi]
movabs r12, 0xffffffff00000000
mov rax, r14
and rcx, r12
and rax, r12
cmp rax, rcx
jae 0x140054402
nop
mov ecx, reloc.WS2_32.dll_recv
call fcn.1400b5dec
mov rbx, rax
test rax, rax
je 0x140054422
mov qword [rax], rsi
mov r9d, 4
mov r8d, 0x3000
mov qword [rax + 8], r14
mov rdx, rdi
mov qword [rsp + 0x20], rbp
xor ecx, ecx
mov rsi, rax
call sub.KERNEL32.dll_VirtualAlloc
mov r14, rax
test rax, rax
je 0x140054485
lea rcx, [rax + rdi]
and rax, r12
and rcx, r12
cmp rax, rcx
jb 0x1400543b0
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov rcx, rax
lea r8d, [rdx + 0x70]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
jne 0x14005448a
xor r9d, r9d
xor edx, edx
mov r8d, 0x8000
mov rcx, r14
call sub.KERNEL32.dll_VirtualFree
mov rcx, rsi
lea rdx, [sub.KERNEL32.dll_VirtualFree]
xor r8d, r8d
call fcn.140053d20
mov ecx, reloc.WLDAP32.dll_Ordinal_14
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov r12, qword [rsp + 0xa0]
mov r14, qword [rsp + 0xa8]
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.140060520
mov rbx, qword [rsp + 0xb0]
add rsp, 0x70
pop r15
pop r13
pop rdi
pop rsi
pop rbp
ret
mov rcx, rbx
jmp 0x140054438
mov qword [rax + 8], r14
movzx eax, word [r15 + 0x16]
shr eax, 0xd
and eax, 1
mov qword [rdi + 0x58], rbp
mov dword [rdi + 0x20], eax
lea rax, [sub.KERNEL32.dll_VirtualAlloc]
mov qword [rdi + 0x28], rax
lea rax, [sub.KERNEL32.dll_VirtualFree]
mov qword [rdi + 0x30], rax
lea rax, [0x1400541f0]
mov qword [rdi + 0x38], rax
lea rax, [0x140054200]
mov qword [rdi + 0x40], rax
lea rax, [0x140054210]
mov qword [rdi + 0x48], rax
mov eax, dword [rsp + 0x34]
mov dword [rdi + 0x68], eax
mov qword [rdi + 0x70], rsi
mov eax, dword [r15 + 0x54]
cmp eax, 0x26a400
jbe 0x1400545ce
mov ecx, reloc.WS2_32.dll_listen
call qword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [rdi + 0x1c], ebp
je 0x140054517
mov rax, qword [rdi]
xor r8d, r8d
mov rcx, qword [rdi + 8]
xor edx, edx
mov r9d, dword [rax + 0x28]
add r9, rcx
call r9
mov rcx, qword [rdi + 0x50]
call fcn.1400afdbc
mov rcx, qword [rdi + 0x10]
test rcx, rcx
je 0x14005455c
cmp dword [rdi + 0x18], ebp
jle 0x140054557
mov rbx, rbp
mov rcx, qword [rdi + 0x10]
mov rax, qword [rcx + rbx]
test rax, rax
je 0x14005454c
mov rdx, qword [rdi + 0x58]
mov rcx, rax
call qword [rdi + 0x48]
mov rcx, qword [rdi + 0x10]
inc ebp
add rbx, 8
cmp ebp, dword [rdi + 0x18]
jl 0x140054531
call fcn.1400afdbc
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x140054574
mov r9, qword [rdi + 0x58]
xor edx, edx
mov r8d, 0x8000
call qword [rdi + 0x30]
mov rsi, qword [rdi + 0x70]
mov rbp, qword [rdi + 0x58]
mov r14, qword [rdi + 0x30]
test rsi, rsi
je 0x1400545b5
nop word [rax + rax]
mov rcx, qword [rsi + 8]
mov r9, rbp
xor edx, edx
mov r8d, 0x8000
call r14
mov rbx, qword [rsi]
mov rcx, rsi
call fcn.1400afdbc
mov rsi, rbx
test rbx, rbx
jne 0x140054590
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x140054452
mov rdx, rax
mov qword [rsp + 0x20], rbp
mov r9d, 4
mov r8d, 0x1000
mov rcx, r14
call sub.KERNEL32.dll_VirtualAlloc
mov r8d, dword [r15 + 0x54]
mov rdx, r13
mov rcx, rax
mov rbx, rax
call fcn.1400a58c0
movsxd rax, dword [0x1401536cc]
mov r13d, ebp
add rax, rbx
mov qword [rdi], rax
mov qword [rax + 0x30], r14
mov rcx, qword [rdi]
mov r12, qword [rdi + 8]
movzx esi, word [rcx + 0x14]
add rsi, 0x24
cmp bp, word [rcx + 6]
jae 0x1400546f8
add rsi, rcx
nop dword [rax]
mov edx, dword [rsi + 4]
test edx, edx
jne 0x140054685
movsxd rax, dword [r15 + 0x38]
test eax, eax
jle 0x1400546e1
mov ecx, dword [rsi]
lea r9d, [rdx + 4]
mov r10, qword [rdi + 0x28]
mov rbx, rax
mov rax, qword [rdi + 0x58]
add rcx, r12
mov rdx, rbx
mov qword [rsp + 0x20], rax
mov r8d, 0x1000
call r10
test rax, rax
je 0x1400544fc
mov ecx, dword [rsi]
mov r8, rbx
add rcx, r12
xor edx, edx
mov dword [rsi - 4], ecx
call fcn.1400a5f70
jmp 0x1400546e1
mov ecx, dword [rsi + 8]
add ecx, edx
cmp ecx, 0x26a400
ja 0x1400544f1
mov ecx, dword [rsi]
mov r9d, 4
mov rax, qword [rdi + 0x58]
add rcx, r12
mov r10, qword [rdi + 0x28]
mov r8d, 0x1000
mov qword [rsp + 0x20], rax
call r10
test rax, rax
je 0x1400544fc
mov ebx, dword [rsi]
lea rax, [0x140153690]
mov edx, dword [rsi + 8]
add rbx, r12
mov r8d, dword [rsi + 4]
mov rcx, rbx
add rdx, rax
call fcn.1400a58c0
mov dword [rsi - 4], ebx
mov rcx, qword [rdi]
inc r13d
add rsi, 0x28
movzx eax, word [rcx + 6]
cmp r13d, eax
jl 0x140054630
mov rbx, qword [rcx + 0x30]
sub rbx, qword [r15 + 0x30]
je 0x140054799
cmp dword [rcx + 0xb4], ebp
jne 0x140054715
mov eax, ebp
jmp 0x14005479e
mov rsi, qword [rdi + 8]
mov r11d, dword [rcx + 0xb0]
add r11, rsi
mov eax, dword [r11]
test eax, eax
je 0x140054799
nop word [rax + rax]
mov r9d, dword [r11 + 4]
lea rdx, [r11 + 8]
mov r10d, eax
mov r8d, ebp
add r10, rsi
lea rax, [r9 - 8]
test rax, 0xfffffffffffffffe
jbe 0x14005478c
nop dword [rax]
movzx eax, word [rdx]
mov ecx, eax
shr eax, 0xc
and ecx, 0xfff
cmp eax, 3
je 0x14005476e
cmp eax, 0xa
jne 0x140054772
add qword [rcx + r10], rbx
jmp 0x140054772
add dword [rcx + r10], ebx
mov r9d, dword [r11 + 4]
inc r8d
add rdx, 2
mov eax, r8d
lea rcx, [r9 - 8]
shr rcx, 1
cmp rax, rcx
jb 0x140054750
mov eax, r9d
add r11, rax
mov eax, dword [r11]
test eax, eax
jne 0x140054730
mov eax, 1
mov rcx, rdi
mov dword [rdi + 0x24], eax
call fcn.140054010
test eax, eax
je 0x1400544fc
mov rcx, rdi
call fcn.140053e80
test eax, eax
je 0x1400544fc
mov rdx, qword [rdi]
mov rcx, rdx
mov eax, dword [rdx + 0xd0]
test eax, eax
je 0x14005480c
mov rsi, qword [rdi + 8]
mov rbx, qword [rax + rsi + 0x18]
test rbx, rbx
je 0x14005480c
mov rax, qword [rbx]
test rax, rax
je 0x14005480c
nop word [rax + rax]
xor r8d, r8d
mov rcx, rsi
lea edx, [r8 + 1]
call rax
mov rax, qword [rbx + 8]
lea rbx, [rbx + 8]
test rax, rax
jne 0x1400547f0
mov rcx, qword [rdi]
mov eax, dword [rcx + 0x28]
test eax, eax
je 0x140054850
add rax, r14
cmp dword [rdi + 0x20], ebp
je 0x140054844
xor r8d, r8d
mov rcx, r14
lea edx, [r8 + 1]
call rax
test eax, eax
jne 0x140054835
mov ecx, 0x45a
jmp 0x1400544f6
mov dword [rdi + 0x1c], 1
mov rax, rdi
jmp 0x140054454
mov qword [rdi + 0x60], rax
mov rax, rdi
jmp 0x140054454
mov qword [rdi + 0x60], rbp
mov rax, rdi
jmp 0x140054454
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140054464