Function at 0x18002d8ab
Capabilities:
Query environment variable
Read file on windows

Disassembly:
push rbp
sub rsp, 0xd00
lea rbp, [rsp + 0x40]
mov qword [rsp], rax
mov rax, 0xcfc
mov dword [rsp + rax], 0xcccccccc
sub rax, 4
cmp rax, 4
jg 0x18002d89a
mov rax, qword [rsp]
mov dword [rsp], 0xcccccccc
mov dword [rsp + 4], 0xcccccccc
mov qword [rbp + 0x200], rsi
mov qword [rbp + 0x1f8], rbx
mov qword [rbp + 0xcd0], rcx
mov qword [rbp + 0xcd8], rdx
mov qword [rbp + 0xce0], r8
mov dword [rbp + 0xce8], r9d
mov rax, qword [0x1800f4ae8]
xor rax, rbp
mov qword [rbp + 0xcb0], rax
mov qword [rbp + 0x118], 0xfffffffffffffffe
mov dword [rbp + 0xa0], 0x57
mov dword [rbp + 0xa4], 0
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
call rax
mov qword [rbp + 0x120], rax
mov rax, qword [rbp + 0x120]
lea rdx, [rbp + 0x20]
mov rcx, qword [sym.imp.KERNEL32.dll_IsWow64Process]
mov qword [rbp + 0x198], rcx
mov rcx, rax
mov rax, qword [rbp + 0x198]
call rax
mov dword [rbp + 0xa8], eax
mov eax, dword [rbp + 0xa8]
mov dword [rbp + 0xac], eax
mov eax, dword [rbp + 0xac]
cmp eax, 1
jne 0x18002d9be
mov eax, dword [rbp + 0x20]
cmp eax, 1
jne 0x18002d9be
mov eax, 0x29e
mov dword [rbp + 0x10c], eax
lea rax, reloc.WS2_32.dll_inet_ntoa
mov rdx, rax
mov rcx, rbp
call fcn.180061140
mov rax, qword [rbp + 0xcb0]
xor rax, rbp
mov rcx, rax
call fcn.1800612f0
mov eax, dword [rbp + 0x10c]
mov rbx, qword [rbp + 0x1f8]
mov rsi, qword [rbp + 0x200]
lea rsp, [rbp + 0xcc0]
pop rbp
ret
mov eax, dword [rbp + 0xce8]
lea rdx, [rbp + 0x14]
mov rcx, qword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
mov qword [rbp + 0x1a0], rcx
mov ecx, eax
mov rax, qword [rbp + 0x1a0]
call rax
mov dword [rbp + 0xb0], eax
mov eax, dword [rbp + 0xb0]
mov dword [rbp + 0xac], eax
mov eax, dword [rbp + 0xac]
test eax, eax
jne 0x18002da65
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov dword [rbp + 0xb4], eax
mov eax, dword [rbp + 0xb4]
mov dword [rbp + 0xbc], eax
mov eax, dword [rbp + 0xbc]
mov dword [rbp + 0x110], eax
lea rax, reloc.WS2_32.dll_inet_ntoa
mov rdx, rax
mov rcx, rbp
call fcn.180061140
mov rax, qword [rbp + 0xcb0]
xor rax, rbp
mov rcx, rax
call fcn.1800612f0
mov eax, dword [rbp + 0x110]
mov rbx, qword [rbp + 0x1f8]
mov rsi, qword [rbp + 0x200]
lea rsp, [rbp + 0xcc0]
pop rbp
ret
lea rax, [rbp + 0xa18]
mov edx, 0x40
lea rcx, [0x1801026d4]
mov ebx, dword [rbp + 0x14]
mov qword [rbp + 0x1a8], rcx
mov rcx, rax
mov rax, qword [rbp + 0x1a8]
mov r8, rax
mov r9d, ebx
call fcn.1800667e0
mov dword [rbp + 0xb8], eax
lea rax, [rbp + 0xa18]
mov edx, reloc.OLEAUT32.dll_SetErrorInfo
mov rcx, rax
call fcn.18002bdb0
mov dword [rbp + 0xc0], eax
mov eax, dword [rbp + 0xc0]
mov dword [rbp + 0xa4], eax
mov eax, dword [rbp + 0xa4]
test eax, eax
jne 0x18002dea6
mov rax, qword [rbp + 0xce0]
lea rdx, [rbp + 0xaa0]
mov ecx, 0x104
mov rbx, qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov dword [rbp + 0x1b0], ecx
mov rcx, rax
mov eax, dword [rbp + 0x1b0]
mov r8d, eax
call rbx
mov dword [rbp + 0xc4], eax
mov eax, dword [rbp + 0xc4]
test eax, eax
jne 0x18002db2c
lea rax, [rbp + 0xaa0]
lea rdx, [0x180102700]
mov rcx, rax
call fcn.180062660
mov qword [rbp + 0x130], rax
lea rax, [rbp + 0x210]
mov edx, 0x800
mov ecx, 0
lea rbx, [rbp + 0xa18]
mov rsi, qword [rbp + 0xcd8]
mov qword [rsp + 0x20], rsi
lea rsi, [rbp + 0xaa0]
mov qword [rsp + 0x28], rsi
lea rsi, [rbp + 0x2c]
mov qword [rsp + 0x30], rsi
lea rsi, [rbp + 0x38]
mov qword [rsp + 0x38], rsi
mov qword [rbp + 0x1b8], rcx
mov rcx, rax
mov rax, qword [rbp + 0x1b8]
mov r8, rax
mov r9, rbx
call fcn.1800396a7
mov dword [rbp + 0xcc], eax
mov eax, dword [rbp + 0xcc]
mov dword [rbp + 0xac], eax
mov eax, dword [rbp + 0xac]
cmp eax, 1
jne 0x18002dea6
mov eax, 0x43a
mov edx, 0
mov ecx, dword [rbp + 0xce8]
mov rbx, qword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [rbp + 0x1c0], ecx
mov ecx, eax
mov eax, dword [rbp + 0x1c0]
mov r8d, eax
call rbx
mov qword [rbp + 0x138], rax
mov rax, qword [rbp + 0x138]
mov qword [rbp + 0x140], rax
mov rax, qword [rbp + 0x140]
test rax, rax
je 0x18002dea6
lea rax, [rbp + 0x68]
mov rdx, qword [rbp + 0x140]
mov rcx, rax
call fcn.18005f92c
mov qword [rbp + 0x148], rax
lea rax, [rbp + 0x68]
mov edx, 0
mov ecx, 0x800
mov dword [rbp + 0x1c8], ecx
mov rcx, rax
mov eax, dword [rbp + 0x1c8]
mov r8d, eax
call fcn.18005fc46
mov dword [rbp + 0xe0], eax
mov eax, dword [rbp + 0xe0]
mov dword [rbp + 0xe4], eax
mov eax, dword [rbp + 0xe4]
mov dword [rbp + 0xac], eax
mov eax, dword [rbp + 0xac]
test eax, eax
jne 0x18002de81
lea rax, [rbp + 0x68]
mov edx, 0
lea rcx, [rbp + 0x210]
mov ebx, dword [rbp + 0x38]
add ebx, dword [rbp + 0x2c]
mov qword [rbp + 0x1d0], rcx
mov rcx, rax
mov rax, qword [rbp + 0x1d0]
mov r8, rax
mov r9d, ebx
call fcn.18005ffb8
mov dword [rbp + 0xe8], eax
mov eax, dword [rbp + 0xe8]
mov dword [rbp + 0xf0], eax
mov eax, dword [rbp + 0xf0]
mov dword [rbp + 0xac], eax
mov eax, dword [rbp + 0xac]
test eax, eax
jne 0x18002de81
mov dword [rbp + 0x44], 0
lea rax, [rbp + 0x68]
mov qword [rbp + 0x150], rax
mov rax, qword [rbp + 0x150]
mov edx, 2
movsxd rdx, edx
imul rdx, rdx, 8
add rdx, qword [rax]
mov rax, qword [rdx]
mov rdx, qword [rbp + 0x150]
mov rcx, rdx
call rax
jmp 0x18002dda5
mov rax, qword [rbp + 0x158]
mov qword [rbp + 0x160], rax
mov rax, qword [rbp + 0x160]
mov qword [rbp + 0xf4], rax
lea rax, [rbp + 0x68]
mov qword [rbp + 0x168], rax
mov rax, qword [rbp + 0x168]
mov edx, 2
movsxd rdx, edx
imul rdx, rdx, 8
add rdx, qword [rax]
mov rax, qword [rdx]
mov rdx, qword [rbp + 0x168]
mov rcx, rdx
call rax
jmp 0x18002dd9c
mov rax, qword [rbp + 0x170]
mov qword [rbp + 0x178], rax
mov rax, qword [rbp + 0x140]
mov rdx, qword [rbp + 0xf4]
mov ecx, dword [rbp + 0x2c]
add rcx, qword [rbp + 0x178]
lea rbx, [rbp + 0x44]
mov qword [rbp + 0x1d8], rcx
mov rcx, rax
mov rax, qword [rbp + 0x1d8]
mov r8, rax
mov r9, rbx
call fcn.18005e838
mov qword [rbp + 0x180], rax
jmp 0x18002ddb1
mov qword [rbp + 0x170], rax
jmp 0x18002dd4d
mov qword [rbp + 0x158], rax
jmp 0x18002dcff
mov rax, qword [rbp + 0x180]
mov qword [rbp + 0x188], rax
mov rax, qword [rbp + 0x188]
mov qword [rbp + 0x190], rax
mov rax, qword [rbp + 0x190]
test rax, rax
je 0x18002de81
mov eax, 0
cmp eax, 1
je 0x18002de42
lea rax, [rbp + 0x68]
mov edx, dword [rbp + 0x2c]
lea rcx, [rbp + 0x50]
mov ebx, 4
mov qword [rbp + 0x1e0], rcx
mov rcx, rax
mov rax, qword [rbp + 0x1e0]
mov r8, rax
mov r9d, ebx
call fcn.1800600c4
mov dword [rbp + 0xfc], eax
mov eax, dword [rbp + 0xfc]
mov dword [rbp + 0x104], eax
mov eax, dword [rbp + 0x104]
mov dword [rbp + 0xac], eax
mov eax, dword [rbp + 0xac]
test eax, eax
jl 0x18002de42
mov eax, dword [rbp + 0x50]
test eax, eax
je 0x18002dddd
lea rax, [rbp + 0xa18]
mov edx, 0x7d0
mov rcx, rax
call fcn.18002bdb0
mov dword [rbp + 0x100], eax
mov eax, dword [rbp + 0x100]
mov dword [rbp + 0xa4], eax
mov rax, qword [rbp + 0x190]
mov rdx, qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rax
call rdx
mov dword [rbp + 0x108], eax
mov rax, qword [rbp + 0x140]
mov rdx, qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rax
call rdx
mov dword [rbp + 0xec], eax
lea rax, [rbp + 0x68]
mov rcx, rax
call fcn.18005fa98
mov eax, dword [rbp + 0xa4]
test eax, eax
jne 0x18002ded0
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov dword [rbp + 0xc8], eax
mov eax, dword [rbp + 0xc8]
mov dword [rbp + 0xa0], eax
jmp 0x18002e046
lea rax, [rbp + 0xa18]
mov edx, 0xc0000000
mov ecx, 0
mov ebx, 0
mov dword [rsp + 0x20], 3
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x30], 0
mov rsi, qword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [rbp + 0x1e8], ecx
mov rcx, rax
mov eax, dword [rbp + 0x1e8]
mov r8d, eax
mov r9, rbx
call rsi
mov qword [rbp + 0x128], rax
mov rax, qword [rbp + 0xcd0]
mov rdx, qword [rbp + 0x128]
mov qword [rax + 0x68], rdx
mov rax, qword [rbp + 0xcd0]
mov rax, qword [rax + 0x68]
cmp rax, 0xffffffffffffffff
jne 0x18002df56
mov rax, qword [rbp + 0xcd0]
mov qword [rax + 0x68], 0
mov rax, qword [rbp + 0xcd0]
mov rax, qword [rax + 0x68]
test rax, rax
je 0x18002e02b
mov rax, qword [rbp + 0xcd0]
mov dword [rax + 0x50], 0xffffffff
mov rax, qword [rbp + 0xcd0]
mov rax, qword [rax + 0x68]
mov edx, 0x1388
mov rcx, rax
call fcn.18002beb5
mov dword [rbp + 0xd4], eax
mov eax, dword [rbp + 0xd4]
mov dword [rbp + 0xac], eax
mov eax, dword [rbp + 0xac]
test eax, eax
jle 0x18002e01f
mov rax, qword [rbp + 0xcd0]
mov rax, qword [rax + 0x68]
lea rdx, [rbp + 0x5c]
mov ecx, 4
lea rbx, [rbp + 8]
mov qword [rsp + 0x20], 0
mov rsi, qword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [rbp + 0x1f0], ecx
mov rcx, rax
mov eax, dword [rbp + 0x1f0]
mov r8d, eax
mov r9, rbx
call rsi
mov dword [rbp + 0xdc], eax
mov eax, dword [rbp + 0xdc]
mov dword [rbp + 0xac], eax
mov eax, dword [rbp + 0xac]
cmp eax, 1
jne 0x18002e01f
mov eax, dword [rbp + 0x5c]
cmp eax, 0xff000000
jae 0x18002e01f
mov rax, qword [rbp + 0xcd0]
mov edx, dword [rbp + 0x5c]
mov dword [rax + 0x50], edx
mov dword [rbp + 0xa0], 0
jmp 0x18002e046
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov dword [rbp + 0xd8], eax
mov eax, dword [rbp + 0xd8]
mov dword [rbp + 0xa0], eax
mov eax, dword [rbp + 0xa0]
mov dword [rbp + 0xd0], eax
mov eax, dword [rbp + 0xd0]
mov dword [rbp + 0x114], eax
lea rax, reloc.WS2_32.dll_inet_ntoa
mov rdx, rax
mov rcx, rbp
call fcn.180061140
mov rax, qword [rbp + 0xcb0]
xor rax, rbp
mov rcx, rax
call fcn.1800612f0
mov eax, dword [rbp + 0x114]
mov rbx, qword [rbp + 0x1f8]
mov rsi, qword [rbp + 0x200]
lea rsp, [rbp + 0xcc0]
pop rbp
ret