joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1401643e0
Capabilities:
Query environment variable

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov r12d, 1
sub r8d, 1
mov edi, ecx
mov ecx, 0x66666667
mov eax, r8d
mov rbp, rdx
movsxd rsi, r8d
imul ecx
sar r8d, 0x1f
mov rbx, r9
mov ecx, edx
sar ecx, 2
sub ecx, r8d
je 0x140164435
mov r8d, 0x66666667
nop dword [rax]
mov eax, ecx
sar ecx, 0x1f
add r12d, 1
imul r8d
sar edx, 2
sub edx, ecx
mov ecx, edx
jne 0x140164420
mov edx, dword [rbx + 0x2c]
cmp edx, 0xffffffff
je 0x1401644b0
mov ecx, dword [rbx + 0xc]
cmp r12d, edx
mov r9, rbx
cmovl r12d, edx
mov r8d, 1
lea edx, [r12 + 2]
mov eax, ecx
sub eax, edx
cmp ecx, edx
mov edx, 0xffffffff
cmovle eax, edx
mov ecx, edi
mov rdx, rbp
mov dword [rbx + 0xc], eax
add r12d, 1
call fcn.140163ca0
mov ecx, dword [rbx + 8]
mov eax, dword [rbx + 0x2c]
mov rdx, rbx
mov dword [rbx + 0x10], eax
mov eax, ecx
and ecx, 0x20
or eax, 0x1c0
or ecx, 0x45
mov dword [rbx + 8], eax
call fcn.140163850
add dword [rbx + 0xc], r12d
mov rdx, rbx
mov rcx, rsi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp fcn.140164110
mov eax, dword [0x140172600]
cmp eax, 0xffffffff
je 0x1401644dc
test eax, eax
je 0x1401644cc
mov edx, 2
mov dword [rbx + 0x2c], edx
jmp 0x14016443d
call fcn.14016b9a0
test al, 1
mov edx, 3
jne 0x1401644bf
jmp 0x1401644c4
lea rcx, [0x140284867]
call sub.msvcrt.dll_getenv
test rax, rax
je 0x140164504
movsx eax, byte [rax]
sub eax, 0x30
cmp eax, 2
setbe al
movzx eax, al
mov dword [0x140172600], eax
jmp 0x1401644bb
xor eax, eax
jmp 0x1401644f9

Function at 0x140166770
Capabilities:
Query environment variable

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov r12d, 1
sub r8d, 1
mov edi, ecx
mov ecx, 0x66666667
mov eax, r8d
mov rbp, rdx
movsxd rsi, r8d
imul ecx
sar r8d, 0x1f
mov rbx, r9
mov ecx, edx
sar ecx, 2
sub ecx, r8d
je 0x1401667c5
mov r8d, 0x66666667
nop dword [rax]
mov eax, ecx
sar ecx, 0x1f
add r12d, 1
imul r8d
sar edx, 2
sub edx, ecx
mov ecx, edx
jne 0x1401667b0
mov edx, dword [rbx + 0x2c]
cmp edx, 0xffffffff
je 0x140166840
mov ecx, dword [rbx + 0xc]
cmp r12d, edx
mov r9, rbx
cmovl r12d, edx
mov r8d, 1
lea edx, [r12 + 2]
mov eax, ecx
sub eax, edx
cmp ecx, edx
mov edx, 0xffffffff
cmovle eax, edx
mov ecx, edi
mov rdx, rbp
mov dword [rbx + 0xc], eax
add r12d, 1
call fcn.140165ee0
mov ecx, dword [rbx + 8]
mov eax, dword [rbx + 0x2c]
mov rdx, rbx
mov dword [rbx + 0x10], eax
mov eax, ecx
and ecx, 0x20
or eax, 0x1c0
or ecx, 0x45
mov dword [rbx + 8], eax
call fcn.140165a00
add dword [rbx + 0xc], r12d
mov rdx, rbx
mov rcx, rsi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp fcn.1401664a0
mov eax, dword [0x140172630]
cmp eax, 0xffffffff
je 0x14016686c
test eax, eax
je 0x14016685c
mov edx, 2
mov dword [rbx + 0x2c], edx
jmp 0x1401667cd
call fcn.14016b9a0
test al, 1
mov edx, 3
jne 0x14016684f
jmp 0x140166854
lea rcx, str.PRINTF_EXPONENT_DIGITS
call sub.msvcrt.dll_getenv
test rax, rax
je 0x140166894
movsx eax, byte [rax]
sub eax, 0x30
cmp eax, 2
setbe al
movzx eax, al
mov dword [0x140172630], eax
jmp 0x14016684b
xor eax, eax
jmp 0x140166889
Function at 0x402c10
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x00408940]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x00408968]
test rbx, rbx
je 0x402c64
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rdi
mov rbp, rax
call rsi
test eax, eax
jne 0x402c5b
test rbp, rbp
je 0x402c5b
mov rax, qword [rbx + 8]
mov rcx, rbp
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x402c40
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea rcx, [0x00408940]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp rax

Function at 0x140a08058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.140a081df
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x140a08089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140a0806f
add dl, dl
jne 0x140a08096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140a080f6
xor eax, eax
add dl, dl
jne 0x140a080a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140a081ad
add dl, dl
jne 0x140a080b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140a080c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140a080d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140a080dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x140a080ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x140a0807e
mov eax, 1
add dl, dl
jne 0x140a08106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140a08113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140a080fb
sub eax, ebx
mov ebx, 1
jne 0x140a0814c
mov ecx, 1
add dl, dl
jne 0x140a0812e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140a0813b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140a08123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140a0807e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x140a08168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140a08175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140a0815d
cmp eax, 0x7d00
jae 0x140a0819b
cmp eax, 0x500
jb 0x140a08196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140a0807e
cmp eax, 0x7f
ja 0x140a0819e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140a0807e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x140a081d2
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x140a0807e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x0041d310]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x0041d320]
mov dword [rax], 1
mov rax, qword [0x0041d330]
mov dword [rax], 1
mov rax, qword [0x0041d300]
mov dword [rax], 1
mov rax, qword [0x0041d1d0]
cmp word [rax], 0x5a4d
jne 0x401067
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x4010c0
mov rax, qword [0x0041d2f0]
mov dword [0x0042200c], ecx
mov eax, dword [rax]
test eax, eax
jne 0x4010b0
mov ecx, 1
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x0041d2b0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x0041d160]
cmp dword [rax], 1
je 0x4010f0
xor eax, eax
add rsp, 0x28
ret
mov ecx, 2
call sym.__set_app_type
jmp 0x401084
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x401108
cmp dx, 0x20b
jne 0x401067
cmp dword [rax + 0x84], 0xe
jbe 0x401067
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x401067
lea rcx, [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x401067
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x401067

Function at 0x401560
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov qword [rbp + 0x10], rcx
mov rcx, qword [rbp + 0x10]
mov rax, qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
call rax
mov dword [rbp - 4], eax
cmp dword [rbp - 4], 0xffffffff
setne al
add rsp, 0x30
pop rbp
ret

Function at 0x401589
Capabilities:
Create directory

Disassembly:
push rbp
sub rsp, 0x130
lea rbp, [rsp + 0x80]
mov qword [rbp + 0xc0], rcx
mov rcx, qword [rbp + 0xc0]
call sym.strlen
mov qword [rbp + 0xa0], rax
mov qword [rbp + 0xa8], 0
mov rax, qword [rbp + 0xa8]
cmp rax, qword [rbp + 0xa0]
jae 0x401649
mov rdx, qword [rbp + 0xc0]
mov rax, qword [rbp + 0xa8]
add rax, rdx
movzx eax, byte [rax]
cmp al, 0x2f
je 0x4015fe
mov rdx, qword [rbp + 0xc0]
mov rax, qword [rbp + 0xa8]
add rax, rdx
movzx eax, byte [rax]
cmp al, 0x5c
jne 0x40163c
mov rdx, qword [rbp + 0xa8]
lea rax, [rbp - 0x60]
mov r8, rdx
mov rdx, qword [rbp + 0xc0]
mov rcx, rax
call sym.strncpy
lea rdx, [rbp - 0x60]
mov rax, qword [rbp + 0xa8]
add rax, rdx
mov byte [rax], 0
lea rax, [rbp - 0x60]
mov rcx, rax
mov rax, qword [sym.imp.msvcrt.dll__mkdir]
call rax
add qword [rbp + 0xa8], 1
jmp 0x4015be
mov rcx, qword [rbp + 0xc0]
mov rax, qword [sym.imp.msvcrt.dll__mkdir]
call rax
mov eax, 0
add rsp, 0x130
pop rbp
ret

Function at 0x401667
Capabilities:
Query environment variable

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
lea rcx, str.ProgramFiles
call sym.getenv
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
add rsp, 0x30
pop rbp
ret
Function at 0x401689
Capabilities:
Get common file path

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov rax, qword [0x00422038]
test rax, rax
jne 0x4016e3
mov edx, 0
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_GetTempPathA]
call rax
mov dword [rbp - 4], eax
mov eax, dword [rbp - 4]
add eax, 1
mov eax, eax
mov rcx, rax
call sym.malloc
mov qword [0x00422038], rax
mov rax, qword [0x00422038]
mov edx, dword [rbp - 4]
lea ecx, [rdx + 1]
mov rdx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetTempPathA]
call rax
mov rax, qword [0x00422038]
add rsp, 0x30
pop rbp
ret

Function at 0x401736
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push rbp
mov eax, 0x1040
call fcn.00414450
sub rsp, rax
lea rbp, [rsp + 0x80]
mov qword [rbp + 0xfd0], rcx
mov qword [rbp + 0xfd8], rdx
lea rdx, [0x0041b00e]
mov rcx, qword [rbp + 0xfd0]
call sym.fopen
mov qword [rbp + 0xfb8], rax
cmp qword [rbp + 0xfb8], 0
jne 0x4017a1
lea r9, str.fopen_source_file
mov r8d, 0x5d
lea rdx, str._home_ubuntu_windows_test_utils.h
mov ecx, 2
call sym.log_log
jmp 0x4018f0
mov rax, qword [rbp + 0xfd8]
lea rdx, [0x0041b04a]
mov rcx, rax
call sym.fopen
mov qword [rbp + 0xfb0], rax
cmp qword [rbp + 0xfb0], 0
jne 0x4017eb
lea r9, str.fopen_destination_file
mov r8d, 0x62
lea rdx, str._home_ubuntu_windows_test_utils.h
mov ecx, 2
call sym.log_log
jmp 0x4018f0
mov rdx, qword [rbp + 0xfb8]
lea rax, [rbp - 0x60]
mov r9, rdx
mov r8d, 0x1000
mov edx, 1
mov rcx, rax
call sym.fread
mov qword [rbp + 0xfa8], rax
cmp qword [rbp + 0xfa8], 0
setne al
test al, al
je 0x4018b3
mov rcx, qword [rbp + 0xfb0]
mov rdx, qword [rbp + 0xfa8]
lea rax, [rbp - 0x60]
mov r9, rcx
mov r8, rdx
mov edx, 1
mov rcx, rax
call sym.fwrite
cmp qword [rbp + 0xfa8], rax
setne al
test al, al
je 0x401897
lea r9, str.Failed_to_write_to_destination_file._n
mov r8d, 0x69
lea rdx, str._home_ubuntu_windows_test_utils.h
mov ecx, 2
call sym.log_log
mov rax, qword [rbp + 0xfb8]
mov rcx, rax
call sym.fclose
mov rax, qword [rbp + 0xfb0]
mov rcx, rax
call sym.fclose
jmp 0x4018f0
lea rax, [rbp - 0x60]
mov r8d, 0x1000
mov edx, 0
mov rcx, rax
call sym.memset
jmp 0x4017eb
mov rax, qword [rbp + 0xfb8]
mov rcx, rax
call sym.fclose
mov rax, qword [rbp + 0xfb0]
mov rcx, rax
call sym.fclose
lea r9, str.File_copied_successfully._n
mov r8d, 0x72
lea rdx, str._home_ubuntu_windows_test_utils.h
mov ecx, 2
call sym.log_log
nop
add rsp, 0x1040
pop rbp
ret
Function at 0x4019f9
Capabilities:
Read file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp + 0x10], rcx
mov dword [rbp + 0x18], edx
mov ecx, 0x10
call sym.malloc
mov qword [rbp - 8], rax
lea rdx, [0x0041b00e]
mov rcx, qword [rbp + 0x10]
call sym.fopen
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
jne 0x401a59
lea r9, str.Failed_to_open_file_n
mov r8d, 0x3f
lea rdx, str._home_ubuntu_windows_test_main.cpp
mov ecx, 2
call sym.log_log
mov eax, 0
jmp 0x401b8f
mov rax, qword [rbp - 0x10]
mov r8d, 2
mov edx, 0
mov rcx, rax
call sym.fseek
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.ftell
sub eax, dword [rbp + 0x18]
mov dword [rbp - 0x14], eax
mov edx, dword [rbp + 0x18]
mov rax, qword [rbp - 0x10]
mov r8d, 0
mov rcx, rax
call sym.fseek
mov eax, dword [rbp - 0x14]
cdqe
mov rcx, rax
call sym.malloc
mov qword [rbp - 0x20], rax
cmp qword [rbp - 0x20], 0
jne 0x401ae3
lea r9, str.Failed_to_allocate_memory_n
mov r8d, 0x49
lea rdx, str._home_ubuntu_windows_test_main.cpp
mov ecx, 2
call sym.log_log
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.fclose
mov eax, 0
jmp 0x401b8f
mov eax, dword [rbp - 0x14]
movsxd rdx, eax
mov rax, qword [rbp - 0x20]
mov r8, rdx
mov edx, 0
mov rcx, rax
call sym.memset
mov eax, dword [rbp - 0x14]
movsxd rdx, eax
mov rcx, qword [rbp - 0x10]
mov rax, qword [rbp - 0x20]
mov r9, rcx
mov r8, rdx
mov edx, 1
mov rcx, rax
call sym.fread
mov qword [rbp - 0x28], rax
mov eax, dword [rbp - 0x14]
cdqe
cmp qword [rbp - 0x28], rax
je 0x401b6a
lea r9, str.Failed_to_read_file_n
mov r8d, 0x50
lea rdx, str._home_ubuntu_windows_test_main.cpp
mov ecx, 2
call sym.log_log
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.fclose
mov rax, qword [rbp - 0x20]
mov rcx, rax
call sym.free
mov eax, 0
jmp 0x401b8f
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.fclose
mov rax, qword [rbp - 8]
mov rdx, qword [rbp - 0x20]
mov qword [rax + 8], rdx
mov rax, qword [rbp - 8]
mov edx, dword [rbp - 0x14]
mov dword [rax], edx
mov rax, qword [rbp - 8]
add rsp, 0x50
pop rbp
ret
Function at 0x401c99
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push rbx
mov rbp, rsp
sub rsp, 0x60
mov qword [rbp + 0x20], rcx
mov dword [rbp + 0x28], edx
lea rdx, [0x0041b00e]
mov rcx, qword [rbp + 0x20]
call sym.fopen
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
jne 0x401ced
lea r9, str.Failed_to_open_file_n
mov r8d, 0x70
lea rdx, str._home_ubuntu_windows_test_main.cpp
mov ecx, 2
call sym.log_log
mov eax, 0
jmp 0x401eaf
mov rax, qword [rbp - 0x10]
mov r8d, 2
mov edx, 0
mov rcx, rax
call sym.fseek
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.ftell
sub eax, dword [rbp + 0x28]
mov dword [rbp - 0x14], eax
mov edx, dword [rbp + 0x28]
mov rax, qword [rbp - 0x10]
mov r8d, 0
mov rcx, rax
call sym.fseek
mov eax, dword [rbp - 0x14]
add eax, 1
cdqe
mov rcx, rax
call sym.malloc
mov qword [rbp - 0x20], rax
cmp qword [rbp - 0x20], 0
jne 0x401d7a
lea r9, str.Failed_to_allocate_memory_n
mov r8d, 0x7a
lea rdx, str._home_ubuntu_windows_test_main.cpp
mov ecx, 2
call sym.log_log
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.fclose
mov eax, 0
jmp 0x401eaf
mov eax, dword [rbp - 0x14]
mov dword [rsp + 0x20], eax
lea r9, str.File_size:__d
mov r8d, 0x7e
lea rdx, str._home_ubuntu_windows_test_main.cpp
mov ecx, 2
call sym.log_log
mov eax, dword [rbp - 0x14]
add eax, 1
movsxd rdx, eax
mov rax, qword [rbp - 0x20]
mov r8, rdx
mov edx, 0
mov rcx, rax
call sym.memset
mov eax, dword [rbp - 0x14]
movsxd rdx, eax
mov rcx, qword [rbp - 0x10]
mov rax, qword [rbp - 0x20]
mov r9, rcx
mov r8, rdx
mov edx, 1
mov rcx, rax
call sym.fread
mov qword [rbp - 0x28], rax
mov eax, dword [rbp - 0x14]
cdqe
cmp qword [rbp - 0x28], rax
je 0x401e2c
lea r9, str.Failed_to_read_file_n
mov r8d, 0x82
lea rdx, str._home_ubuntu_windows_test_main.cpp
mov ecx, 2
call sym.log_log
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.fclose
mov rax, qword [rbp - 0x20]
mov rcx, rax
call sym.free
mov eax, 0
jmp 0x401eaf
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.fclose
lea rax, str.qdTiqsuR0To8eQEZSG11MAudEvAdDcFbNZuRiw2wF3tnBoT1h9sNd0825O8D1492Sgwzi5K5c3c6NVzL7yOlzILBZZbp6iShG5WbpBVTZIkvazQK7ba8ZQNgnXtxsCOg
mov qword [rbp - 0x30], rax
mov dword [rbp - 4], 0
mov eax, dword [rbp - 4]
cmp eax, dword [rbp - 0x14]
jge 0x401eab
mov eax, dword [rbp - 4]
movsxd rdx, eax
mov rax, qword [rbp - 0x20]
add rax, rdx
movzx esi, byte [rax]
mov eax, dword [rbp - 4]
movsxd rbx, eax
mov rax, qword [rbp - 0x30]
mov rcx, rax
call sym.strlen
mov rcx, rax
mov rax, rbx
mov edx, 0
div rcx
mov rcx, rdx
mov rdx, rcx
mov rax, qword [rbp - 0x30]
add rax, rdx
movzx ecx, byte [rax]
mov eax, dword [rbp - 4]
movsxd rdx, eax
mov rax, qword [rbp - 0x20]
add rax, rdx
xor esi, ecx
mov edx, esi
mov byte [rax], dl
add dword [rbp - 4], 1
jmp 0x401e4a
mov rax, qword [rbp - 0x20]
add rsp, 0x60
pop rbx
pop rsi
pop rbp
ret

Function at 0x402870
Capabilities:
Write file on windows

Disassembly:
sub rsp, 0x28
mov r9, rcx
mov rcx, rdx
mov edx, 1
mov r9, qword [r9 + 8]
call sym.fwrite
add rsp, 0x28
ret
Function at 0x403e54
Capabilities:
Read file on windows

Disassembly:
push r13
push r12
push rbx
sub rsp, 0x20
mov rbx, rdx
lea rdx, [0x0041b4d3]
call sym.fopen
mov r12, rax
test rax, rax
je 0x403ef0
mov rcx, rax
mov r8d, 2
xor edx, edx
call sym.fseek
mov rcx, r12
test eax, eax
je 0x403e92
call sym.fclose
jmp 0x403eda
call sym.ftell
cdqe
mov qword [rbx], rax
lea rcx, [rax + 1]
call sym.malloc
mov r13, rax
test rax, rax
je 0x403ee5
xor r8d, r8d
xor edx, edx
mov rcx, r12
call sym.fseek
mov r8, qword [rbx]
mov r9, r12
mov edx, 1
mov rcx, r13
call sym.fread
cmp rax, qword [rbx]
je 0x403edf
mov rcx, r13
call sym.free
xor r12d, r12d
jmp 0x403ef0
mov byte [r13 + rax], 0
mov rcx, r12
mov r12, r13
call sym.fclose
mov rax, r12
add rsp, 0x20
pop rbx
pop r12
pop r13
ret

Function at 0x40514b
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
mov r9, qword [0x00422078]
cmp dword [0x00422058], ecx
mov ebx, ecx
jge 0x40517a
xor eax, eax
test r9, r9
je 0x40532a
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
lea rax, [rdx + rcx - 1]
mov rsi, rax
mov r10, rax
sub r10, rsi
cmp rsi, rdx
je 0x4051ad
mov cl, byte [rsi - 1]
cmp cl, 0x2f
je 0x4051ad
cmp cl, 0x5c
je 0x4051ad
dec rsi
jmp 0x405190
mov eax, 5
cmp r8d, 0x270f
jg 0x4051e0
mov eax, 4
cmp r8d, 0x3e7
jg 0x4051e0
mov eax, 3
cmp r8d, 0x63
jg 0x4051e0
xor eax, eax
cmp r8d, 0xa
setge al
inc rax
mov ecx, 0x16
lea r12, [rsp + 0x78]
sub rcx, rax
mov rdi, r12
cmp rcx, r10
cmova rcx, r10
lea rbp, [rax + rcx + 1]
mov ecx, ecx
mov al, 0x20
rep movsb byte [rdi], byte [rsi]
lea r10, [r12 + rbp]
mov ecx, 0x18
sub rcx, rbp
mov rdi, r10
rep stosb byte [rdi], al
mov ecx, 0xa
mov eax, r8d
dec r10
cdq
idiv ecx
add edx, 0x30
mov byte [r10], dl
mov edx, r8d
mov r8d, eax
cmp edx, 9
jg 0x405218
mov byte [r10 - 1], 0x3a
test r9, r9
je 0x4052e9
lea rdi, [rsp + 0x40]
mov rdx, r9
mov esi, dword [0x00422058]
lea r15, [rsp + 0x68]
mov rcx, rdi
lea r14, [rsp + 0x58]
lea r13, [rsp + 0x30]
call sym.mg_mk_str
mov r8, qword [rsp + 0x40]
mov r9, qword [rsp + 0x48]
mov qword [rsp + 0x30], r8
mov rdx, r13
mov r8, r14
mov rcx, rdi
mov qword [rsp + 0x38], r9
mov r9, r15
call sym.mg_next_comma_list_entry_n
mov r8, qword [rsp + 0x40]
mov r9, qword [rsp + 0x48]
test r8, r8
je 0x4052e3
movups xmm0, xmmword [rsp + 0x58]
mov rdx, r13
mov rcx, rdi
mov qword [rsp + 0x28], r9
mov qword [rsp + 0x20], r8
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x48], rbp
movups xmmword [rsp + 0x30], xmm0
call sym.mg_str_starts_with
mov r8, qword [rsp + 0x20]
mov r9, qword [rsp + 0x28]
test eax, eax
je 0x40526f
cmp qword [rsp + 0x70], 0
je 0x40526f
mov rax, qword [rsp + 0x68]
movsx esi, byte [rax]
sub esi, 0x30
xor eax, eax
cmp esi, ebx
jl 0x40532a
cmp qword [0x00422050], 0
jne 0x405305
mov ecx, 2
call qword [dbg.__acrt_iob_func]
mov qword [0x00422050], rax
mov r9, qword [0x00422050]
mov r8d, 0x18
mov edx, 1
mov rcx, r12
mov dword [0x0041a240], ebx
call sym.fwrite
mov eax, 1
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x4076d4
Capabilities:
Read file on windows

Disassembly:
push r13
push r12
push rbx
sub rsp, 0x20
lea rdx, [0x0041b4d3]
call sym.fopen
mov r12, rax
test rax, rax
je 0x407778
mov rcx, rax
mov r8d, 2
xor edx, edx
call sym.fseek
mov rcx, r12
test eax, eax
je 0x407716
call sym.fclose
xor r12d, r12d
jmp 0x407778
call sym.ftell
movsxd rbx, eax
test ebx, ebx
jle 0x407762
lea ecx, [rbx + 1]
movsxd rcx, ecx
call sym.malloc
mov r13, rax
test rax, rax
je 0x407762
xor r8d, r8d
xor edx, edx
mov rcx, r12
call sym.fseek
mov r9, r12
mov r8, rbx
mov edx, 1
mov rcx, r13
call sym.fread
cmp rbx, rax
je 0x407767
mov rcx, r13
call sym.free
xor r13d, r13d
jmp 0x40776d
mov byte [r13 + rbx], 0
mov rcx, r12
mov r12, r13
call sym.fclose
mov rax, r12
add rsp, 0x20
pop rbx
pop r12
pop r13
ret

Function at 0x4079fd
Capabilities:
Write file on windows

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x40
mov r14, rcx
call sym.json_fread
mov rbp, rax
test rax, rax
jne 0x407a24
or r13d, 0xffffffff
jmp 0x407ae8
lea rdx, [0x0041b708]
mov rcx, r14
call sym.fopen
mov r12, rax
test rax, rax
je 0x407a1b
lea rax, [sym.json_printer_file]
or rsi, 0xffffffffffffffff
xor ebx, ebx
mov rdi, rbp
mov qword [rsp + 0x20], rax
mov rcx, rsi
mov eax, ebx
lea r8, [rsp + 0x20]
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x38], 0
repne scasb al, byte [rdi]
not rcx
lea rdx, [rcx - 1]
mov rcx, rbp
call sym.json_prettify
mov r13d, eax
test eax, eax
jns 0x407ad3
mov rcx, r12
mov rdi, rbp
call sym.fclose
mov rcx, r14
lea rdx, [0x0041b708]
call sym.fopen
xor r8d, r8d
xor edx, edx
mov rcx, rax
mov r12, rax
call sym.fseek
mov rcx, rsi
mov eax, ebx
mov r9, r12
repne scasb al, byte [rdi]
mov edx, 1
not rcx
lea r8, [rcx - 1]
mov rcx, rbp
call sym.fwrite
jmp 0x407ae0
mov rdx, r12
mov ecx, 0xa
call sym.fputc
mov rcx, r12
call sym.fclose
mov rcx, rbp
call sym.free
mov eax, r13d
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
Function at 0x412600
Capabilities:
Encrypt data using aes
Reference aes constants

Disassembly:
push rsi
push rbx
xor eax, eax
mov r8b, byte [rdx + rax]
mov byte [rcx + rax], r8b
mov r8b, byte [rdx + rax + 1]
mov byte [rcx + rax + 1], r8b
mov r8b, byte [rdx + rax + 2]
mov byte [rcx + rax + 2], r8b
mov r8b, byte [rdx + rax + 3]
mov byte [rcx + rax + 3], r8b
add rax, 4
cmp rax, 0x10
jne 0x412604
mov r10d, 4
lea r11, [0x0041c7a0]
lea rbx, [0x0041c680]
movzx r9d, byte [rcx + 0xc]
movzx r8d, byte [rcx + 0xd]
movzx edx, byte [rcx + 0xe]
movzx eax, byte [rcx + 0xf]
test r10b, 3
jne 0x41267e
mov sil, byte [r11 + r8]
mov r8b, byte [r11 + rdx]
mov dl, byte [r11 + rax]
mov al, byte [r11 + r9]
mov r9d, r10d
shr r9d, 2
xor sil, byte [rbx + r9]
mov r9d, esi
xor r9b, byte [rcx]
xor r8b, byte [rcx + 1]
inc r10d
add rcx, 4
xor dl, byte [rcx - 2]
xor al, byte [rcx - 1]
mov byte [rcx + 0xc], r9b
mov byte [rcx + 0xd], r8b
mov byte [rcx + 0xe], dl
mov byte [rcx + 0xf], al
cmp r10d, 0x2c
jne 0x412648
pop rbx
pop rsi
ret

Function at 0x4126f0
Capabilities:
Encrypt data using aes
Reference aes constants

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov ebx, 1
lea rdi, [0x0041c7a0]
mov r11, rcx
mov r8, rdx
mov r12, rdx
mov rdx, rcx
xor ecx, ecx
call sym.AddRoundKey
lea rax, [r11 + 4]
lea rbp, [r11 + 0x10]
mov qword [rsp + 0x28], rax
mov r9, r11
mov rdx, r11
mov rax, rdx
xor ecx, ecx
movzx r8d, byte [rax]
inc ecx
add rax, 4
mov r8b, byte [rdi + r8]
mov byte [rax - 4], r8b
cmp cl, 4
jne 0x412737
inc rdx
cmp rdx, qword [rsp + 0x28]
jne 0x412732
mov dl, byte [r11 + 5]
mov al, byte [r11 + 1]
mov byte [r11 + 1], dl
mov dl, byte [r11 + 9]
mov byte [r11 + 5], dl
mov dl, byte [r11 + 0xd]
mov byte [r11 + 0xd], al
mov al, byte [r11 + 2]
mov byte [r11 + 9], dl
mov dl, byte [r11 + 0xa]
mov byte [r11 + 0xa], al
mov al, byte [r11 + 6]
mov byte [r11 + 2], dl
mov dl, byte [r11 + 0xe]
mov byte [r11 + 0xe], al
mov al, byte [r11 + 3]
mov byte [r11 + 6], dl
mov dl, byte [r11 + 0xf]
mov byte [r11 + 3], dl
mov dl, byte [r11 + 0xb]
mov byte [r11 + 0xf], dl
mov dl, byte [r11 + 7]
mov byte [r11 + 7], al
mov byte [r11 + 0xb], dl
cmp ebx, 0xa
je 0x412851
mov r8b, byte [r9]
mov r15b, byte [r9 + 1]
mov r14b, byte [r9 + 2]
mov r10b, byte [r9 + 3]
mov ecx, r8d
xor ecx, r15d
mov esi, r14d
mov r13d, ecx
movzx ecx, cl
xor esi, r10d
call sym.xtime
xor r13d, esi
mov ecx, r15d
xor eax, r8d
xor ecx, r14d
xor eax, r13d
movzx ecx, cl
mov byte [r9], al
call sym.xtime
movzx ecx, sil
xor r15d, eax
xor r15d, r13d
mov byte [r9 + 1], r15b
call sym.xtime
xor r14d, eax
xor r8d, r10d
xor r14d, r13d
movzx ecx, r8b
mov byte [r9 + 2], r14b
call sym.xtime
xor r10d, eax
add r9, 4
xor r10d, r13d
mov byte [r9 - 1], r10b
cmp rbp, r9
jne 0x4127c1
mov ecx, ebx
mov r8, r12
mov rdx, r11
inc ebx
call sym.AddRoundKey
jmp 0x41272c
mov r8, r12
mov rdx, r11
mov ecx, 0xa
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp sym.AddRoundKey