joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140001001
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x140007cd0]
mov rcx, qword [0x140007c50]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x140007ce0]
cmp word [rcx], 0x5a4d
mov dword [rax], 1
mov rax, qword [0x140007cf0]
mov dword [rax], 1
jne 0x140001083
movsxd rax, dword [rcx + 0x3c]
add rax, rcx
cmp dword [rax], 0x4550
jne 0x140001083
mov ecx, dword [rax + 0x18]
cmp cx, 0x10b
je 0x14000105e
cmp cx, 0x20b
je 0x14000106d
jmp 0x140001083
cmp dword [rax + 0x74], 0xe
jbe 0x140001083
cmp dword [rax + 0xe8], 0
jmp 0x14000107d
cmp dword [rax + 0x84], 0xe
jbe 0x140001083
cmp dword [rax + 0xf8], 0
setne dl
movzx edx, dl
mov rax, qword [0x140007cc0]
mov dword [0x14000b00c], edx
mov ecx, 2
cmp dword [rax], 0
jne 0x14000109f
mov ecx, 1
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x140007da0]
mov edx, dword [rdx]
mov dword [rax], edx
call sym.__p__commode
mov rdx, qword [0x140007d80]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x140007c30]
cmp dword [rax], 1
jne 0x1400010e1
mov rcx, qword [sym._matherr]
call sym.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret

Function at 0x140001360
Capabilities:
Set registry value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x40
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov qword [rbp + 0x20], r8
mov dword [rbp + 0x28], r9d
mov rdx, qword [rbp + 0x18]
mov rax, qword [rbp + 0x10]
lea rcx, [rbp - 8]
mov qword [rsp + 0x20], rcx
mov r9d, 0x102
mov r8d, 0
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
call rax
test eax, eax
sete al
test al, al
je 0x140001457
mov rax, qword [rbp + 0x18]
mov rdx, rax
lea rax, str.Key_location_opened_successfully:__ls_n
mov rcx, rax
call sym.printf_char_const__::_
mov rax, qword [rbp - 8]
mov rdx, qword [rbp + 0x20]
mov dword [rsp + 0x28], 4
lea rcx, [rbp + 0x28]
mov qword [rsp + 0x20], rcx
mov r9d, 4
mov r8d, 0
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
call rax
test eax, eax
sete al
test al, al
je 0x14000141c
mov edx, dword [rbp + 0x28]
mov rax, qword [rbp + 0x20]
mov r8d, edx
mov rdx, rax
lea rax, str.Key_changed_in_registry:__ls___u_n
mov rcx, rax
call sym.printf_char_const__::_
jmp 0x140001445
lea rax, str.Key_not_changed_in_registry_n
mov rcx, rax
call sym.printf_char_const__::_
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rax, str.Error__u_n
mov rcx, rax
call sym.printf_char_const__::_
mov rax, qword [rbp - 8]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_RegCloseKey]
call rax
jmp 0x140001487
mov rax, qword [rbp + 0x18]
mov rdx, rax
lea rax, str.Unsuccessful_in_opening_key:__ls_n
mov rcx, rax
call sym.printf_char_const__::_
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rax, str.Error:__u_n
mov rcx, rax
call sym.printf_char_const__::_
nop
add rsp, 0x40
pop rbp
ret
Function at 0x140001e50
Capabilities:
Get thread local storage value

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
lea rdi, [0x14000b100]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14000b0e0]
test rbx, rbx
je 0x140001e9c
mov ecx, dword [rbx]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
test rsi, rsi
je 0x140001e96
test eax, eax
jne 0x140001e96
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
jmp 0x140001e6e
mov rcx, rdi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x140002050
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x140002073
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
jne 0x140002073
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x140002074
Capabilities:
Enumerate pe sections

Disassembly:
xor r8d, r8d
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
movzx r9d, word [rcx + 6]
lea rax, [rcx + rax + 0x18]
cmp r8d, r9d
jae 0x1400020ae
mov r10d, dword [rax + 0xc]
mov rcx, r10
cmp rdx, r10
jb 0x1400020a5
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x1400020b0
inc r8d
add rax, 0x28
jmp 0x14000208c
xor eax, eax
ret

Function at 0x140002121
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x140007c50]
mov r8, rcx
mov rcx, r9
call sym._ValidateImageBase
test eax, eax
je 0x14000214d
mov rdx, r8
mov rcx, r9
sub rdx, r9
add rsp, 0x28
jmp sym._FindPESection
xor eax, eax
add rsp, 0x28
ret
Function at 0x168b280
Capabilities:
Terminate process

Disassembly:
cld
pop r11
jmp 0x168b28d
inc rsi
mov byte [rdi], dl
inc rdi
mov dl, byte [rsi]
add ebx, ebx
jne 0x168b29d
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jb 0x168b285
lea eax, [rcx + 1]
jmp 0x168b2ab
dec eax
call r11
adc eax, eax
call r11
adc eax, eax
add ebx, ebx
jne 0x168b2be
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jae 0x168b2a4
sub eax, 3
jb 0x168b2de
shl eax, 8
movzx edx, dl
or eax, edx
inc rsi
xor eax, 0xffffffff
je 0x168b32d
sar eax, 1
movsxd rbp, eax
jb 0x168b314
jmp 0x168b2ec
add ebx, ebx
jne 0x168b2ea
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x168b314
inc ecx
add ebx, ebx
jne 0x168b2fa
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x168b314
call r11
adc ecx, ecx
add ebx, ebx
jne 0x168b30d
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jae 0x168b2fc
add ecx, 2
jmp 0x168b319
call r11
adc ecx, ecx
cmp rbp, 0xfffffffffffffb00
adc ecx, 2
call fcn.0168b242
jmp 0x168b28d
pop rsi
mov rdi, rsi
push rsi
mov rdi, rsi
mov rsi, 0x894e00
mov dl, 0x67
push rbx
push rdi
lea rcx, [rdi + rsi - 3]
pop rsi
push rsi
pop rbx
jmp 0x168b379
cmp rsi, rcx
jae 0x168b381
push rsi
pop rsi
lodsb al, byte [rsi]
cmp al, 0x80
jb 0x168b360
cmp al, 0x8f
ja 0x168b360
cmp byte [rsi - 2], 0xf
je 0x168b366
sub al, 0xe8
cmp al, 1
ja 0x168b34a
cmp rsi, rcx
jae 0x168b381
push rsi
lodsd eax, dword [rsi]
sub al, dl
jne 0x168b350
pop rdi
bswap eax
sub eax, edi
add eax, ebx
stosd dword [rdi], eax
cmp rsi, rcx
jae 0x168b381
lodsb al, byte [rsi]
jmp 0x168b360
pop rbx
pop rsi
sub rsp, 0x28
lea rdi, [rsi + 0x1277000]
mov eax, dword [rdi]
or eax, eax
je 0x168b3de
mov ebx, dword [rdi + 4]
lea rcx, [rax + rsi + 0x128b000]
add rbx, rsi
add rdi, 8
call qword [sym.imp.KERNEL32.DLL_LoadLibraryA]
xchg rbp, rax
mov al, byte [rdi]
inc rdi
or al, al
je 0x168b38e
mov rcx, rdi
mov rdx, rdi
dec eax
repne scasb al, byte [rdi]
mov rcx, rbp
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
or rax, rax
je 0x168b3d8
mov qword [rbx], rax
add rbx, 8
jmp 0x168b3ae
jmp qword [sym.imp.KERNEL32.DLL_ExitProcess]
add rsp, 0x28
add rdi, 4
lea rbx, [rsi - 4]
xor eax, eax
mov al, byte [rdi]
inc rdi
or eax, eax
je 0x168b422
cmp al, 0xef
ja 0x168b40a
add rbx, rax
mov rax, qword [rbx]
bswap rax
add rax, rsi
mov qword [rbx], rax
jmp 0x168b3ea
and al, 0xf
shl eax, 0x10
mov ax, word [rdi]
add rdi, 2
or eax, eax
jne 0x168b3f9
mov eax, dword [rdi]
add rdi, 4
jmp 0x168b3f9
mov rbp, qword [sym.imp.KERNEL32.DLL_VirtualProtect]
lea rdi, [rsi - 0x1000]
mov ebx, 0x1000
push rax
mov r9, rsp
mov r8d, 4
mov rdx, rbx
mov rcx, rdi
sub rsp, 0x20
call rbp
lea rax, [rdi + 0x1af]
and byte [rax], 0x7f
and byte [rax + 0x28], 0x7f
lea r9, [rsp + 0x20]
mov r8, qword [r9]
mov rdx, rbx
mov rcx, rdi
call rbp
add rsp, 0x28
pop rbp
pop rdi
pop rsi
pop rbx
lea rax, [rsp - 0x80]
push 0
cmp rsp, rax
jne 0x168b476
sub rsp, 0xffffffffffffff80
jmp 0x473a80
Function at 0x180004444
Capabilities:
Enumerate files on windows

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0xb8]
sub rsp, 0x1a0
mov r14, qword [rcx + 0x10]
mov rdi, rcx
movabs rcx, 0x7fffffffffffffff
mov rax, rcx
sub rax, r14
cmp rax, 2
jb 0x1800046a2
cmp qword [rdi + 0x18], 0xf
jbe 0x180004491
mov rdi, qword [rdi]
lea r15, [r14 + 2]
mov ebx, 0xf
lea rsi, [rsp + 0x20]
xorps xmm0, xmm0
xorps xmm1, xmm1
movups xmmword [rsp + 0x20], xmm0
movdqu xmmword [rsp + 0x30], xmm1
cmp r15, rbx
jbe 0x180004506
mov rbx, r15
or rbx, 0xf
cmp rbx, rcx
jbe 0x1800044d0
mov rbx, rcx
movabs rcx, 0x8000000000000000
jmp 0x1800044f2
mov eax, 0x16
cmp rbx, rax
cmovb rbx, rax
lea rcx, [rbx + 1]
test rcx, rcx
jne 0x1800044e9
xor esi, esi
jmp 0x180004501
cmp rcx, 0x1000
jb 0x1800044f9
call fcn.180013878
jmp 0x1800044fe
call fcn.180038064
mov rsi, rax
mov qword [rsp + 0x20], rsi
mov r8, r14
mov qword [rsp + 0x30], r15
mov rdx, rdi
mov qword [rsp + 0x38], rbx
mov rcx, rsi
call fcn.180052710
mov word [rsi + r14], 0x2a5c
lea rcx, [rsp + 0x20]
mov byte [rsi + r15], 0
lea rdx, [rsp + 0x60]
cmp qword [rsp + 0x38], 0xf
cmova rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov rdx, qword [rsp + 0x38]
mov rdi, rax
cmp rdx, 0xf
jbe 0x180004586
mov rcx, qword [rsp + 0x20]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x180004581
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180004696
call fcn.180037f78
movdqa xmm0, xmmword [0x180061830]
mov byte [rsp + 0x20], 0
movdqu xmmword [rsp + 0x30], xmm0
cmp rdi, 0xffffffffffffffff
jne 0x1800045a6
xor eax, eax
jmp 0x180004679
xor ebx, ebx
test byte [rsp + 0x60], 0x10
je 0x180004658
and qword [rsp + 0x50], 0
lea rax, [rbp - 0x74]
and qword [rsp + 0x58], 0
xorps xmm0, xmm0
movups xmmword [rsp + 0x40], xmm0
or r8, 0xffffffffffffffff
inc r8
cmp byte [rax + r8], 0
jne 0x1800045cf
lea rdx, [rbp - 0x74]
lea rcx, [rsp + 0x40]
call fcn.18000b6e8
mov rdx, qword [rsp + 0x58]
lea rax, [rsp + 0x40]
mov rcx, qword [rsp + 0x40]
cmp rdx, 0xf
cmova rax, rcx
cmp qword [rsp + 0x50], 1
jne 0x18000460b
cmp byte [rax], 0x2e
je 0x180004629
cmp rdx, 0xf
lea rax, [rsp + 0x40]
cmova rax, rcx
cmp qword [rsp + 0x50], 2
jne 0x180004627
cmp word [rax], 0x2e2e
je 0x180004629
inc ebx
cmp rdx, 0xf
jbe 0x180004658
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x180004653
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18000469c
call fcn.180037f78
lea rdx, [rsp + 0x60]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x1800045a8
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindClose]
mov eax, ebx
lea r11, [rsp + 0x1a0]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
call fcn.18003fe8c
int3
call fcn.18003fe8c
int3
call fcn.180001380
int3
Function at 0x180014b70
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
mov r9, qword [rcx]
mov ebx, 0x270
mov ecx, dword [r9]
cmp ecx, ebx
jne 0x180014bdb
lea r8, [r9 + 8]
mov r10d, 0x7fffffff
mov r11d, 0x9908b0df
mov edx, dword [r8 - 4]
xor edx, dword [r8]
lea r8, [r8 + 4]
and edx, r10d
xor edx, dword [r8 - 8]
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, r11d
xor ecx, dword [r8 + 0x62c]
xor ecx, edx
mov dword [r8 + 0x9b8], ecx
sub rbx, 1
jne 0x180014b9e
mov ecx, dword [r9]
jmp 0x180014cb1
cmp ecx, 0x4e0
jb 0x180014cb1
lea rbx, [r9 + 0x9c4]
mov esi, 0xe3
mov edi, dword [rbx]
mov r10d, 0x7fffffff
mov r11d, 0x9908b0df
mov eax, edi
mov r8, rbx
mov edx, eax
add rbx, 4
mov edi, dword [rbx]
xor edx, edi
and edx, r10d
xor edx, eax
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, r11d
xor ecx, dword [r8 + 0x634]
xor ecx, edx
mov dword [r8 - 0x9c0], ecx
sub rsi, 1
jne 0x180014c01
lea rbx, [r9 + 0xd50]
mov esi, 0x18c
mov edi, dword [rbx]
mov eax, edi
mov r8, rbx
mov edx, eax
add rbx, 4
mov edi, dword [rbx]
xor edx, edi
and edx, r10d
xor edx, eax
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, r11d
xor ecx, dword [r8 - 0xd4c]
xor ecx, edx
mov dword [r8 - 0x9c0], ecx
sub rsi, 1
jne 0x180014c46
mov eax, dword [r9 + 0x1380]
mov edx, eax
xor edx, dword [r9 + 4]
and edx, r10d
xor edx, eax
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, r11d
xor ecx, dword [r9 + 0x634]
xor ecx, edx
mov dword [r9 + 0x9c0], ecx
xor ecx, ecx
mov dword [r9], ecx
mov rbx, qword [rsp + 8]
mov rsi, qword [rsp + 0x10]
mov rdi, qword [rsp + 0x18]
mov eax, ecx
mov edx, dword [r9 + rax*4 + 4]
lea eax, [rcx + 1]
mov dword [r9], eax
mov ecx, edx
mov eax, dword [r9 + 0x1384]
shr ecx, 0xb
and eax, ecx
xor edx, eax
mov eax, edx
and eax, 0xff3a58ad
shl eax, 7
xor edx, eax
mov eax, edx
and eax, 0xffffdf8c
shl eax, 0xf
xor edx, eax
mov eax, edx
shr eax, 0x12
xor eax, edx
ret
Function at 0x1800414b0
Capabilities:
Parse pe header

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov ebx, ecx
test r8d, r8d
jne 0x18004151f
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x18004151f
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x18004151f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x18004151f
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x18004151f
cmp dword [rcx + 0x84], 0xe
jbe 0x18004151f
cmp dword [rcx + 0xf8], 0
je 0x18004151f
mov ecx, ebx
call fcn.1800415d0
mov byte [rbp + 0x28], 0
lea rax, [rbp + 0x18]
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x20]
mov qword [rbp - 0x10], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov eax, 2
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
lea r9, [rbp - 0x2c]
lea r8, [rbp - 0x18]
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x30]
call fcn.1800413ac
nop
cmp dword [rbp + 0x20], 0
je 0x18004156d
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.180041578
int3
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 1]
jmp 0x1800414b0

Function at 0x1800430cc
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x1800430e2
mov al, 1
jmp 0x180043142
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x1800430f3
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x180043140
mov ecx, dword [rcx + 0x18]
nop
call fcn.18004d48c
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x180043140
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x180043140
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x180043140
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x180043142
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x180047b14
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x1050
call fcn.180038b20
sub rsp, rax
mov rax, qword [0x180073080]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.180042fac
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x180047b63
mov rax, rbp
jmp 0x180047c6b
mov rax, qword [rbx]
mov rcx, r14
sub rax, qword [rbx + 8]
and ecx, 0x3f
cqo
mov rbx, r14
sub rax, rdx
sar rbx, 6
sar rax, 1
mov r9, r15
lea r12, [rcx + rcx*8]
mov rsi, rax
lea rax, [0x180000000]
xor r8d, r8d
mov rdx, qword [rax + rbx*8 + 0xc1120]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.180048e90
mov r13, rax
lea rax, [0x180000000]
mov rcx, qword [rax + rbx*8 + 0xc1120]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x180047c67
mov rcx, qword [rcx + r12*8 + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 0x1000
mov qword [rsp + 0x20], rdi
lea rdx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x180047c67
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.180048e90
test rax, rax
js 0x180047c67
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x180047c67
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x180047c59
lea r8, [0x180000000]
cmp rcx, rdx
jae 0x180047c59
cmp byte [rcx], 0xd
jne 0x180047c3f
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x180047c4e
cmp byte [rcx + 1], 0xa
jne 0x180047c4e
inc rcx
jmp 0x180047c4e
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0x734b0]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x180047c21
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x180047c6b
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.180038820
mov rbx, qword [rsp + 0x1090]
add rsp, 0x1050
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x180048230
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
movsxd r15, ecx
lea r9, [0x1800c1120]
mov rax, r15
mov rbp, r15
and eax, 0x3f
sar rbp, 6
mov ecx, 4
xor esi, esi
mov r14, rdx
lea rdi, [rax + rax*8]
mov rax, qword [r9 + rbp*8]
lea r13d, [rcx + 6]
mov r10, qword [rax + rdi*8 + 0x28]
test r8, r8
je 0x180048287
cmp word [rdx], r13w
jne 0x180048287
or byte [rax + rdi*8 + 0x38], cl
jmp 0x18004828c
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x1800483b1
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x1800483d2
lea r9, [rdx + 2]
cmp cx, r11w
je 0x1800482c5
mov rdx, r9
mov word [rbx], cx
jmp 0x1800482ec
cmp r9, r8
jae 0x1800482fc
cmp word [r9], r13w
mov rax, r12
mov ecx, 4
cmove rax, rcx
add rdx, rax
mov eax, r13d
cmp word [r9], r13w
cmovne ax, r11w
mov word [rbx], ax
mov rax, r12
add rbx, rax
cmp rdx, r8
jb 0x1800482a6
jmp 0x1800483b1
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rsi
mov r8d, r12d
lea rdx, [rsp + 0x70]
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1800483a6
cmp dword [rsp + 0x80], esi
je 0x1800483a6
lea r8, [0x1800c1120]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x18004837e
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x18004834e
mov word [rbx], r13w
jmp 0x1800483ae
mov ecx, 0xd
mov word [rsp + 0x78], ax
mov word [rbx], cx
mov rax, qword [r8 + rbp*8]
lea rcx, [rax + rdi*8]
mov al, byte [rsp + rsi + 0x78]
mov byte [rcx + rsi + 0x3a], al
inc rsi
cmp rsi, r12
jl 0x18004835b
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x1800483ae
cmp word [rsp + 0x70], r13w
jne 0x18004838b
cmp rbx, r14
je 0x180048348
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.180048e98
cmp word [rsp + 0x70], r13w
je 0x1800483b1
mov ecx, 0xd
mov word [rbx], cx
add rbx, r12
sub rbx, r14
sar rbx, 1
lea eax, [rbx + rbx]
mov rbx, qword [rsp + 0x88]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r8, [0x1800c1120]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x1800483ab
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x1800483b1
Function at 0x18004be4c
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x18004be7c
xor eax, eax
jmp 0x18004bf3f
mov rbp, rbx
cmp word [rax], si
je 0x18004bea1
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x18004be88
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x18004be84
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.18004a534
movsxd r14, eax
test eax, eax
jne 0x18004bedf
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x18004be75
mov rcx, r14
call fcn.180047368
mov rdi, rax
test rax, rax
jne 0x18004bef8
xor ecx, ecx
call fcn.18004549c
jmp 0x18004bed4
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.18004a534
test eax, eax
jne 0x18004bf29
mov rcx, rdi
call fcn.18004549c
jmp 0x18004bf33
xor ecx, ecx
call fcn.18004549c
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret

Function at 0x18004fb38
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov esi, edx
mov ebx, ecx
call fcn.1800435d0
mov ecx, ebx
lea r8, [rsp + 0x30]
and ecx, 0x3ff
mov r9d, 2
bts ecx, 0xa
mov edx, 0x20000001
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
xor edx, edx
test eax, eax
je 0x18004fbd9
cmp ebx, dword [rsp + 0x30]
je 0x18004fbd2
test esi, esi
je 0x18004fbd2
mov r10, qword [rdi + 0x98]
mov r9d, edx
movzx r8d, word [r10]
lea rcx, [r10 + 2]
lea eax, [r8 - 0x41]
cmp ax, 0x19
jbe 0x18004fbad
sub r8w, 0x61
cmp r8w, 0x19
ja 0x18004fbba
movzx r8d, word [rcx]
inc r9d
add rcx, 2
jmp 0x18004fb97
or rax, 0xffffffffffffffff
inc rax
cmp word [r10 + rax*2], dx
jne 0x18004fbbe
cmp r9d, eax
setne dl
mov eax, edx
jmp 0x18004fbdb
mov eax, 1
jmp 0x18004fbdb
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x180051264
Capabilities:
Clear file content

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x20
mov rbx, rdx
mov rsi, r8
xor edx, edx
mov r14d, ecx
lea r8d, [rdx + 1]
call fcn.180048e98
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.180048e98
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x1800513b4
cmp rax, 0xffffffffffffffff
je 0x1800513b4
xor edi, edi
test rbp, rbp
jle 0x18005135f
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.180045424
mov rbx, rax
test rax, rax
jne 0x1800512ec
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x180051355
mov edx, 0x8000
mov ecx, r14d
call fcn.1800510e8
mov r15d, eax
mov eax, 0x1000
mov r8d, ebp
cmp rbp, rax
mov r9, rsi
mov rdx, rbx
mov ecx, r14d
cmovge r8d, eax
call fcn.180046a10
cmp eax, 0xffffffff
je 0x180051335
cdqe
sub rbp, rax
test rbp, rbp
jg 0x1800512fc
mov edx, r15d
mov ecx, r14d
call fcn.1800510e8
jmp 0x180051355
cmp byte [rsi + 0x38], dil
je 0x18005134c
cmp dword [rsi + 0x34], 5
jne 0x18005134c
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x180051355
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.18004549c
jmp 0x1800513c8
jns 0x1800513c8
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.180048e98
cmp rax, 0xffffffffffffffff
jne 0x180051380
cmp byte [rsi + 0x30], dil
je 0x1800513c8
mov edi, dword [rsi + 0x2c]
jmp 0x1800513c8
mov ecx, r14d
call fcn.18004d48c
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x1800513c8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, 0xd
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
jmp 0x1800513c8
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x1800513c1
mov eax, dword [rsi + 0x2c]
jmp 0x1800513c6
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.180048e98
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret

Function at 0x1800523f0
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x180052418
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x180052418
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret