Function at 0x140040580
Capabilities:
Encode data using xor
Parse pe header

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
lea rbp, [rsp - 0x68]
sub rsp, 0x168
mov rax, qword [0x1400d0080]
xor rax, rsp
mov qword [rbp + 0x50], rax
mov rax, qword [rbp + 0xe8]
xor ebx, ebx
mov qword [rbp - 0x40], rax
mov r12, rdx
mov eax, 0x5a4d
mov qword [rbp - 0x50], rcx
mov r14, rcx
mov qword [rbp + 0x30], rbx
mov qword [rbp + 0x40], rbx
cmp word [rdx], ax
jne 0x140040cba
movsxd rsi, dword [rdx + 0x3c]
add rsi, rdx
cmp dword [rsi], 0x4550
jne 0x140040cba
mov eax, 0x20b
cmp word [rsi + 0x18], ax
je 0x14004068c
mov dword [rbp - 0x20], 0x15f71582
mov ecx, 0x15d9
mov dword [rbp - 0x1c], 0x15fc1586
mov dword [rbp - 0x18], 0x15b31594
mov dword [rbp - 0x14], 0x158715be
mov dword [rbp - 0x10], 0x15c21584
mov dword [rbp - 0xc], 0x1597158a
mov dword [rbp - 8], 0x158815c5
mov dword [rbp - 4], 0x159c1588
mov dword [rbp], 0x15dc15c9
mov dword [rbp + 4], 0x15cc15df
mov dword [rbp + 8], 0x1587158f
mov dword [rbp + 0xc], 0x159b
mov byte [rbp + 0x10], 1
nop
lea eax, [rcx + rbx]
xor word [rbp + rbx*2 - 0x20], ax
inc rbx
cmp rbx, 0x17
jb 0x140040650
mov byte [rbp + 0x10], 0
lea rdx, [rbp - 0x20]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.14003b430
lea rdx, [0x14003b610]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
xor eax, eax
jmp 0x140040b81
mov edi, dword [rsi + 0x50]
xor ecx, ecx
mov edx, edi
mov qword [rsp + 0x160], r15
mov r8d, 0x3000
lea r9d, [rcx + 4]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r15, rax
test rax, rax
je 0x140040b79
movzx eax, word [rsi + 0x14]
lea r8, [rbp + 0x20]
mov rcx, r14
mov qword [rsp + 0x1b0], r13
mov eax, dword [rax + rsi + 0x24]
sub edi, eax
mov dword [rbp - 0x28], eax
mov eax, edi
mov edx, edi
mov qword [rbp - 0x48], rax
mov qword [rbp + 0x20], rbx
call fcn.140040040
mov qword [rbp - 0x38], rax
mov r13, rax
test rax, rax
jne 0x1400407ee
mov dword [rsp + 0x40], 0x15f71582
mov ecx, 0x15d9
mov dword [rsp + 0x44], 0x15fc1586
mov dword [rsp + 0x48], 0x15bf159b
mov dword [rsp + 0x4c], 0x158c15b6
mov dword [rsp + 0x50], 0x15861584
mov dword [rsp + 0x54], 0x159015c3
mov dword [rsp + 0x58], 0x15c6158a
mov dword [rsp + 0x5c], 0x15841586
mov dword [rsp + 0x60], 0x15851585
mov dword [rsp + 0x64], 0x158d1588
mov dword [rsp + 0x68], 0x158b1599
mov dword [rsp + 0x6c], 0x158215cf
mov dword [rsp + 0x70], 0x159f1594
mov dword [rsp + 0x74], 0x1580159c
mov dword [rsp + 0x78], 0x15d61590
mov dword [rsp + 0x7c], 0x1595159e
mov dword [rbp - 0x80], 0x159d1598
mov dword [rbp - 0x7c], 0x15dc159e
mov dword [rbp - 0x78], 0x15901594
mov dword [rbp - 0x74], 0x166b15df
mov dword [rbp - 0x70], 0x16701664
mov dword [rbp - 0x6c], 0x1661166d
mov dword [rbp - 0x68], 0x1669
mov byte [rbp - 0x64], 1
nop
lea eax, [rcx + rbx]
xor word [rsp + rbx*2 + 0x40], ax
inc rbx
cmp rbx, 0x2d
jb 0x1400407b0
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
lea rdx, [rsp + 0x40]
mov byte [rbp - 0x64], 0
call fcn.14003b430
lea rdx, [0x14003b610]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
mov r12, r14
jmp 0x140040c96
mov r8d, dword [rsi + 0x54]
mov rdx, r12
mov rcx, r15
call sub.VCRUNTIME140.dll_memcpy
movzx edi, word [rsi + 0x14]
mov r14d, ebx
add rdi, 0x28
cmp bx, word [rsi + 6]
jae 0x14004083e
add rdi, rsi
test dword [rdi + 0x14], 0x80
ja 0x14004082e
mov edx, dword [rdi + 4]
mov ecx, dword [rdi - 4]
add rdx, r12
mov r8d, dword [rdi]
add rcx, r15
call sub.VCRUNTIME140.dll_memcpy
movzx eax, word [rsi + 6]
inc r14d
add rdi, 0x28
cmp r14d, eax
jl 0x140040811
mov eax, dword [rbp - 0x28]
lea rcx, [rbp - 0x20]
mov r14, r13
mov rdx, r15
sub r13, rax
mov rdi, r13
sub rdi, qword [rsi + 0x30]
call fcn.140041f20
mov rdx, rdi
mov rcx, rax
call fcn.140040d70
mov rdx, r15
lea rcx, [rbp - 0x20]
call fcn.140042070
mov r12, qword [rbp - 0x50]
mov rdx, rax
mov rcx, r12
call fcn.140040e70
test al, al
jne 0x140040930
mov dword [rsp + 0x40], 0x15f71582
mov ecx, 0x15d9
mov dword [rsp + 0x44], 0x15fc1586
mov dword [rsp + 0x48], 0x15bf159b
mov dword [rsp + 0x4c], 0x158c15b6
mov dword [rsp + 0x50], 0x15861584
mov dword [rsp + 0x54], 0x159015c3
mov dword [rsp + 0x58], 0x15c6158a
mov dword [rsp + 0x5c], 0x158d1595
mov dword [rsp + 0x60], 0x1585159a
mov dword [rsp + 0x64], 0x159a1587
mov dword [rsp + 0x68], 0x15ce1588
mov dword [rsp + 0x6c], 0x159d1586
mov dword [rsp + 0x70], 0x159d1581
mov dword [rsp + 0x74], 0x15801581
mov dword [rsp + 0x78], 0x1586
mov byte [rsp + 0x7c], 1
nop word [rax + rax]
lea eax, [rcx + rbx]
xor word [rsp + rbx*2 + 0x40], ax
inc rbx
cmp rbx, 0x1d
jb 0x140040910
mov byte [rsp + 0x7c], 0
lea rdx, [rsp + 0x40]
jmp 0x140040c7a
mov eax, dword [rbp - 0x28]
add rax, r15
je 0x140040b9d
mov rdi, qword [rbp - 0x48]
test rdi, rdi
je 0x140040b9d
mov qword [rsp + 0x38], rbx
lea r8, [rbp - 0x20]
mov qword [rbp - 0x10], rax
mov r9d, Ordinal_45
lea rax, [rbp - 0x28]
mov qword [rbp - 0x18], rbx
mov qword [rsp + 0x30], rax
mov edx, 0x80862007
mov dword [rsp + 0x28], ebx
mov rcx, r12
mov qword [rsp + 0x20], rbx
mov qword [rbp - 0x20], gethostname
mov qword [rbp - 8], r14
mov qword [rbp], rdi
mov dword [rbp - 0x28], ebx
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x140040b9d
mov esi, dword [rsi + 0x28]
lea rdx, [rbp + 0x30]
mov rax, qword [rbp + 0x20]
lea rcx, [rbp + 0x40]
mov r9, rdi
mov qword [rsp + 0x20], rax
mov r8, r14
add rsi, r13
call fcn.140044790
test al, al
jne 0x140040a7f
mov dword [rsp + 0x40], 0x15f71582
mov ecx, 0x15d9
mov dword [rsp + 0x44], 0x15fc1586
mov dword [rsp + 0x48], 0x15bf159e
mov dword [rsp + 0x4c], 0x158c15b3
mov dword [rsp + 0x50], 0x15831583
mov dword [rsp + 0x54], 0x158f1580
mov dword [rsp + 0x58], 0x159415c5
mov dword [rsp + 0x5c], 0x159c1582
mov dword [rsp + 0x60], 0x1598159c
mov dword [rsp + 0x64], 0x159f1585
mov dword [rsp + 0x68], 0x158815cd
mov dword [rsp + 0x6c], 0x159c158e
mov dword [rsp + 0x70], 0x15971582
mov dword [rsp + 0x74], 0x15d415df
mov dword [rsp + 0x78], 0x15971593
mov dword [rsp + 0x7c], 0x1594159e
mov dword [rbp - 0x80], 0x159e159c
mov dword [rbp - 0x7c], 0x15da
mov byte [rbp - 0x78], 1
nop dword [rax]
lea eax, [rcx + rbx]
xor word [rsp + rbx*2 + 0x40], ax
inc rbx
cmp rbx, 0x23
jb 0x140040a60
mov byte [rbp - 0x78], 0
lea rdx, [rsp + 0x40]
jmp 0x140040c7a
mov rax, qword [rbp + 0x30]
lea rdx, [rbp + 0x18]
mov r9, qword [rbp + 0x40]
mov r8, rsi
mov rcx, r12
mov qword [rsp + 0x20], rax
mov dword [rbp + 0x18], ebx
call fcn.140041250
test al, al
jne 0x140040b4f
mov dword [rsp + 0x40], 0x15f5158c
mov ecx, 0x15d7
mov dword [rsp + 0x44], 0x15fa1584
mov dword [rsp + 0x48], 0x15bd159d
mov dword [rsp + 0x4c], 0x15b215b4
mov dword [rsp + 0x50], 0x158415ba
mov dword [rsp + 0x54], 0x159615c1
mov dword [rsp + 0x58], 0x15c4158c
mov dword [rsp + 0x5c], 0x15871586
mov dword [rsp + 0x60], 0x1584158b
mov dword [rsp + 0x64], 0x158e15c9
mov dword [rsp + 0x68], 0x15851599
mov dword [rsp + 0x6c], 0x158b159b
mov dword [rsp + 0x70], 0x15d0159d
mov dword [rsp + 0x74], 0x159c1594
mov dword [rsp + 0x78], 0x15861587
mov dword [rsp + 0x7c], 0x158c
mov byte [rbp - 0x80], 1
nop
lea eax, [rcx + rbx]
xor word [rsp + rbx*2 + 0x40], ax
inc rbx
cmp rbx, 0x1f
jb 0x140040b30
mov byte [rbp - 0x80], 0
lea rdx, [rsp + 0x40]
jmp 0x140040c7a
mov rax, qword [rbp - 0x40]
test rax, rax
je 0x140040b5d
mov ecx, dword [rbp + 0x18]
mov dword [rax], ecx
xor edx, edx
mov r8d, 0x8000
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rax, r14
mov r13, qword [rsp + 0x1b0]
mov r15, qword [rsp + 0x160]
mov rcx, qword [rbp + 0x50]
xor rcx, rsp
call fcn.1400a9330
add rsp, 0x168
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov dword [rsp + 0x40], 0x15f5158c
mov ecx, 0x15d7
mov dword [rsp + 0x44], 0x15fa1584
mov dword [rsp + 0x48], 0x15bd159d
mov dword [rsp + 0x4c], 0x15b215b4
mov dword [rsp + 0x50], 0x158415ba
mov dword [rsp + 0x54], 0x159615c1
mov dword [rsp + 0x58], 0x15c4158c
mov dword [rsp + 0x5c], 0x15941592
mov dword [rsp + 0x60], 0x159c158e
mov dword [rsp + 0x64], 0x15ca158c
mov dword [rsp + 0x68], 0x15831587
mov dword [rsp + 0x6c], 0x158f158e
mov dword [rsp + 0x70], 0x15d01583
mov dword [rsp + 0x74], 0x159f1598
mov dword [rsp + 0x78], 0x15931592
mov dword [rsp + 0x7c], 0x15d61590
mov dword [rbp - 0x80], 0x15971583
mov dword [rbp - 0x7c], 0x158815d9
mov dword [rbp - 0x78], 0x1591159e
mov dword [rbp - 0x74], 0x158a1592
mov dword [rbp - 0x70], 0x1620159a
mov dword [rbp - 0x6c], 0x166f1668
mov dword [rbp - 0x68], 0x16631662
mov dword [rbp - 0x64], 0x1660
mov byte [rbp - 0x60], 1
nop
lea eax, [rcx + rbx]
xor word [rsp + rbx*2 + 0x40], ax
inc rbx
cmp rbx, 0x2f
jb 0x140040c60
mov byte [rbp - 0x60], 0
lea rdx, [rsp + 0x40]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.14003b430
lea rdx, [0x14003b610]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
xor edx, edx
mov r8d, 0x8000
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rdx, qword [rbp - 0x38]
mov rcx, r12
call fcn.140035b90
xor eax, eax
jmp 0x140040b71
mov dword [rsp + 0x40], 0x15f5158c
mov ecx, 0x15d7
mov dword [rsp + 0x44], 0x15fa1584
mov dword [rsp + 0x48], 0x15b21592
mov dword [rsp + 0x4c], 0x15bf15ab
mov dword [rsp + 0x50], 0x158915b3
mov dword [rsp + 0x54], 0x15c21585
mov dword [rsp + 0x58], 0x158b1585
mov dword [rsp + 0x5c], 0x158b1597
mov dword [rsp + 0x60], 0x159c1586
mov dword [rsp + 0x64], 0x158515c9
mov dword [rsp + 0x68], 0x15cc158d
mov dword [rsp + 0x6c], 0x15ab15bd
mov dword [rsp + 0x70], 0x159915cf
mov dword [rsp + 0x74], 0x1593159c
mov dword [rsp + 0x78], 0x15911594
mov word [rsp + 0x7c], bx
mov byte [rsp + 0x7e], 1
lea eax, [rcx + rbx]
xor word [rsp + rbx*2 + 0x40], ax
inc rbx
cmp rbx, 0x1e
jb 0x140040d41
mov byte [rsp + 0x7e], 0
lea rdx, [rsp + 0x40]
jmp 0x140040669