joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140006bb8
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

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 - 0x1328]
mov eax, 0x1410
call fcn.140012190
sub rsp, rax
mov rax, qword [0x140071010]
xor rax, rsp
mov qword [rbp + 0x1300], rax
mov rbx, rcx
mov qword [rsp + 0x40], rcx
xor r15d, r15d
mov dword [rsp + 0x20], r15d
mov qword [rsp + 0x48], r15
mov qword [rsp + 0x58], r15
mov qword [rsp + 0x60], r15
lea r8d, [r15 + 0x3e]
lea rdx, str.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
lea rcx, [rsp + 0x48]
call fcn.14000e37c
nop
call qword [sym.imp.MSVCP140.dll_unsigned_int___cdecl_std::_Random_device_void_]
mov edx, eax
or dword [rbp + 0x12f4], 0xffffffff
mov dword [rsp + 0x74], eax
lea ecx, [r15 + 1]
mov r8d, 0x270
mov eax, edx
shr eax, 0x1e
xor eax, edx
imul edx, eax, 0x6c078965
add edx, ecx
mov dword [rsp + rcx*4 + 0x74], edx
inc rcx
cmp rcx, r8
jb 0x140006c43
mov dword [rsp + 0x70], r8d
mov edi, dword [rsp + 0x58]
dec edi
mov qword [rbx], r15
mov qword [rbx + 0x10], r15
mov qword [rbx + 0x18], 7
mov word [rbx], r15w
mov dword [rsp + 0x20], 1
mov r14d, 0xa
lea rax, [rsp + 0x70]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x30], 0x20
or dword [rsp + 0x38], 0xffffffff
cmp edi, 0xffffffff
jne 0x140006cb5
lea rcx, [rsp + 0x28]
call fcn.14000fe8c
mov edx, eax
jmp 0x140006cf9
lea esi, [rdi + 1]
mov r9d, r15d
mov r8d, r15d
test edi, edi
je 0x140006cd3
lea rcx, [rsp + 0x28]
call fcn.14000fe8c
mov r9d, eax
or r8d, 0xffffffff
xor edx, edx
mov eax, r8d
div esi
mov ecx, eax
xor edx, edx
mov eax, r9d
div esi
cmp eax, ecx
jb 0x140006cf2
xor edx, edx
mov eax, r8d
div esi
cmp edx, edi
jne 0x140006cb8
xor edx, edx
mov eax, r9d
div esi
lea rcx, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae rcx, qword [rsp + 0x48]
movsxd rax, edx
movzx r9d, word [rcx + rax*2]
mov rcx, qword [rbx + 0x10]
cmp rcx, qword [rbx + 0x18]
jae 0x140006d3e
lea rax, [rcx + 1]
mov qword [rbx + 0x10], rax
mov rax, rbx
cmp qword [rbx + 0x18], 8
jb 0x140006d31
mov rax, qword [rbx]
mov word [rax + rcx*2], r9w
mov word [rax + rcx*2 + 2], r15w
jmp 0x140006d46
mov rcx, rbx
call fcn.14000e03c
sub r14, 1
jne 0x140006c8a
lea rcx, [rsp + 0x48]
call fcn.14000c8d4
mov rax, rbx
mov rcx, qword [rbp + 0x1300]
xor rcx, rsp
call fcn.1400110e0
lea r11, [rsp + 0x1410]
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
Function at 0x140006d8c
Capabilities:
Create process on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rdi
push rbp
lea rbp, [rsp - 0x57]
sub rsp, 0xf0
mov rax, qword [0x140071010]
xor rax, rsp
mov qword [rbp + 0x47], rax
mov rbx, rcx
mov edi, 0x68
mov r8d, edi
lea rcx, [rbp - 0x29]
xor edx, edx
call sub.VCRUNTIME140.dll_memset
or dword [rbp + 0x13], 1
xor eax, eax
mov qword [rbp - 0x39], rax
xorps xmm0, xmm0
lea rax, [rbp - 0x49]
mov dword [rbp - 0x29], edi
mov qword [rsp + 0x48], rax
xor edi, edi
lea rax, [rbp - 0x29]
mov word [rbp + 0x17], di
mov qword [rsp + 0x40], rax
xor r9d, r9d
mov qword [rsp + 0x38], rdi
xor r8d, r8d
mov qword [rsp + 0x30], rdi
mov rdx, rbx
mov dword [rsp + 0x28], 0x8000000
xor ecx, ecx
mov dword [rsp + 0x20], edi
movups xmmword [rbp - 0x49], xmm0
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x140006e3f
mov rcx, qword [rbp - 0x49]
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rbp - 0x49]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x41]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp + 0x47]
xor rcx, rsp
call fcn.1400110e0
lea r11, [rsp + 0xf0]
mov rbx, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret
Function at 0x14000b9e4
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r14
mov rbp, rsp
sub rsp, 0x80
mov rax, qword [0x140071010]
xor rax, rsp
mov qword [rbp - 8], rax
mov edi, 0xffff
xor r14d, r14d
movzx esi, dx
mov rbx, rcx
cmp di, dx
jne 0x14000ba26
movzx eax, r14w
jmp 0x14000bb4a
mov rax, qword [rcx + 0x40]
mov rcx, qword [rax]
test rcx, rcx
je 0x14000ba56
mov rdx, qword [rbx + 0x58]
movsxd r8, dword [rdx]
lea rdx, [rcx + r8*2]
cmp rcx, rdx
jae 0x14000ba56
mov rcx, rbx
call qword [sym.imp.MSVCP140.dll_protected:_wchar_t____ptr64___cdecl_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::_Pninc_void____ptr64]
mov word [rax], si
movzx eax, si
jmp 0x14000bb4a
cmp qword [rbx + 0x80], r14
je 0x14000bb47
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x14000ba94
mov rcx, qword [rbx + 0x88]
mov rdx, qword [rbx + 0x90]
mov qword [r8], rcx
sub rdx, rcx
mov rax, qword [rbx + 0x38]
sar rdx, 1
mov qword [rax], rcx
mov rax, qword [rbx + 0x50]
mov dword [rax], edx
mov rcx, qword [rbx + 0x68]
test rcx, rcx
jne 0x14000babe
movzx ecx, si
mov rdx, qword [rbx + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputwc]
cmp ax, di
je 0x14000bb47
movzx edi, si
jmp 0x14000bb47
lea rax, [rbp - 0x40]
mov word [rbp - 0x30], si
mov qword [rsp + 0x38], rax
lea rdx, [rbx + 0x74]
lea rax, [rbp - 8]
mov qword [rsp + 0x30], rax
lea r9, [rbp - 0x2e]
lea rax, [rbp - 0x28]
mov qword [rsp + 0x28], rax
lea r8, [rbp - 0x30]
lea rax, [rbp - 0x38]
mov qword [rsp + 0x20], rax
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_wchar_t__char__struct__Mbstatet_::out_struct__Mbstatet____ptr64__wchar_t_const____ptr64__wchar_t_const____ptr64__wchar_t_const____ptr64____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x14000bb0c
sub eax, 1
je 0x14000bb0c
cmp eax, 2
jne 0x14000bb47
movzx ecx, word [rbp - 0x30]
jmp 0x14000baa0
mov r14, qword [rbp - 0x40]
lea rax, [rbp - 0x28]
sub r14, rax
je 0x14000bb37
mov r9, qword [rbx + 0x80]
lea rcx, [rbp - 0x28]
mov r8, r14
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp r14, rax
jne 0x14000bb47
lea rax, [rbp - 0x30]
mov byte [rbx + 0x72], 1
cmp qword [rbp - 0x38], rax
cmovne di, si
movzx eax, di
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.1400110e0
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret
Function at 0x14000ced4
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x60
mov rax, qword [0x140071010]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x14000cf47
cmp byte [rcx + 0x72], 0
je 0x14000cf47
mov rax, qword [rcx]
mov edi, 0xffff
mov edx, edi
call qword [rax + 0x18]
cmp di, ax
je 0x14000cf9c
mov rcx, qword [rbx + 0x68]
lea rax, [rsp + 0x30]
lea rdx, [rbx + 0x74]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x58]
lea r8, [rsp + 0x38]
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_wchar_t__char__struct__Mbstatet_::unshift_struct__Mbstatet____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x14000cf61
sub eax, 1
je 0x14000cf65
cmp eax, 2
jne 0x14000cf9c
mov byte [rbx + 0x72], 0
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1400110e0
mov rbx, qword [rsp + 0x78]
add rsp, 0x60
pop rdi
ret
mov byte [rbx + 0x72], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x14000cf93
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x38]
mov r8, rdi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rdi, rax
jne 0x14000cf9c
cmp byte [rbx + 0x72], 0
sete al
jmp 0x14000cf49
xor al, al
jmp 0x14000cf49
Function at 0x14000fe8c
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov rbx, rcx
mov esi, 0x7fffffff
mov ebp, 0x9908b0df
mov r9, qword [rbx]
mov r8d, dword [r9]
cmp r8d, 0x270
jne 0x14000fefc
lea r8, [r9 + 8]
mov r10d, 0x270
mov edx, dword [r8 - 4]
xor edx, dword [r8]
lea r8, [r8 + 4]
and edx, esi
xor edx, dword [r8 - 8]
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, ebp
xor ecx, dword [r8 + 0x62c]
xor ecx, edx
mov dword [r8 + 0x9b8], ecx
sub r10, 1
jne 0x14000fec1
mov r8d, dword [r9]
jmp 0x14000ffca
cmp r8d, 0x4e0
jb 0x14000ffca
lea r10, [r9 + 0x9c4]
mov r11d, 0xe3
mov eax, dword [r10]
lea r8, [r10 + 4]
mov edx, dword [r8]
xor edx, eax
and edx, esi
xor edx, eax
mov eax, edx
and al, 1
neg al
mov eax, dword [r8]
sbb ecx, ecx
shr edx, 1
and ecx, ebp
xor ecx, dword [r10 + 0x634]
xor ecx, edx
mov dword [r10 - 0x9c0], ecx
lea r10, [r8]
sub r11, 1
jne 0x14000ff19
lea r10, [r9 + 0xd50]
mov r11d, 0x18c
mov eax, dword [r10]
mov edx, eax
lea r8, [r10 + 4]
xor edx, dword [r8]
and edx, esi
xor edx, eax
mov eax, edx
and al, 1
neg al
mov eax, dword [r8]
sbb ecx, ecx
shr edx, 1
and ecx, ebp
xor ecx, dword [r10 - 0xd4c]
xor ecx, edx
mov dword [r10 - 0x9c0], ecx
lea r10, [r8]
sub r11, 1
jne 0x14000ff5e
mov edx, dword [r9 + 0x1380]
xor edx, dword [r9 + 4]
and edx, esi
xor edx, dword [r9 + 0x1380]
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, ebp
xor ecx, dword [r9 + 0x634]
xor ecx, edx
mov dword [r9 + 0x9c0], ecx
and dword [r9], 0
xor r8d, r8d
mov eax, r8d
mov edx, dword [r9 + rax*4 + 4]
mov ecx, edx
lea eax, [r8 + 1]
shr ecx, 0xb
mov dword [r9], eax
mov eax, dword [r9 + 0x1384]
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
cmp eax, dword [rbx + 0x10]
ja 0x14000fea8
mov rbx, qword [rsp + 8]
mov rbp, qword [rsp + 0x10]
mov rsi, qword [rsp + 0x18]
ret
Function at 0x140010e98
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x40
mov rdi, rdx
lea r8, [rsp + 0x60]
mov ebx, ecx
mov edx, 0x20000001
lea rcx, str._x_sys_default_locale
mov r9d, 2
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
mov r8d, ebx
mov ecx, 0x1300
neg eax
sbb r9d, r9d
and qword [rsp + 0x30], 0
and r9d, dword [rsp + 0x60]
xor edx, edx
and dword [rsp + 0x28], 0
mov dword [rsp + 0x60], r9d
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, eax
test eax, eax
je 0x140010f1c
mov r8, qword [rdi]
dec r8
add r8, rdx
movzx ecx, byte [r8]
lea rax, [0x140015670]
cmp byte [rcx + rax], 0
je 0x140010f1c
dec r8
sub rdx, 1
jne 0x140010f02
mov rbx, qword [rsp + 0x50]
mov rax, rdx
add rsp, 0x40
pop rdi
ret

Function at 0x140011de0
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140011e2a
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140011e2a
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140011e2a
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140011e2a
cmp dword [rcx + 0x84], 0xe
jbe 0x140011e2a
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140011e2c
xor al, al
add rsp, 0x28
ret
Function at 0x180024200
Capabilities:
Parse pe header

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

Function at 0x18002a830
Capabilities:
Delete file

Disassembly:
sub rsp, 0x28
test edx, edx
je 0x18002a84d
mov eax, 1
cmp edx, eax
jne 0x18002a8a2
mov qword [0x180075668], rcx
add rsp, 0x28
ret
cmp qword [0x180060a70], 0
je 0x18002a89d
cmp qword [0x180060a78], 8
mov qword [rsp + 0x20], rbx
lea rbx, [0x180060a60]
mov rcx, rbx
cmovae rcx, qword [0x180060a60]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp qword [0x180060a78], 8
cmovae rbx, qword [0x180060a60]
xor eax, eax
mov qword [0x180060a70], rax
mov word [rbx], ax
mov rbx, qword [rsp + 0x20]
mov eax, 1
add rsp, 0x28
ret

Function at 0x1405f5058
Capabilities:
Decompress data using aplib

Disassembly:
call 0x1405f51df
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 0x1405f5089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1405f506f
add dl, dl
jne 0x1405f5096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1405f50f6
xor eax, eax
add dl, dl
jne 0x1405f50a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1405f51ad
add dl, dl
jne 0x1405f50b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1405f50c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1405f50d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1405f50dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1405f50ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x1405f507e
mov eax, 1
add dl, dl
jne 0x1405f5106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1405f5113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1405f50fb
sub eax, ebx
mov ebx, 1
jne 0x1405f514c
mov ecx, 1
add dl, dl
jne 0x1405f512e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1405f513b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1405f5123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1405f507e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x1405f5168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1405f5175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1405f515d
cmp eax, 0x7d00
jae 0x1405f519b
cmp eax, 0x500
jb 0x1405f5196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1405f507e
cmp eax, 0x7f
ja 0x1405f519e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1405f507e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1405f51d2
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 0x1405f507e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x14003fcd0]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x14003fce0]
mov dword [rax], 1
mov rax, qword [0x14003fcf0]
mov dword [rax], 1
mov rax, qword [0x14003fc80]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x14003fcc0]
mov dword [0x14004700c], ecx
mov eax, dword [rax]
test eax, eax
je 0x1400010b0
mov ecx, 2
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x14003fda0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x14003fd80]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x14003fc30]
cmp dword [rax], 1
je 0x1400010f8
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x140001077
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001110
cmp dx, 0x20b
jne 0x14000105a
cmp dword [rax + 0x84], 0xe
jbe 0x14000105a
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x14000105a
mov rcx, qword [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x14000105a
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x14000105a
Function at 0x1400057ac
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x88
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
lea rax, str.echoBinSafe
mov qword [rbp - 0x48], rax
lea rax, str._usr_lib_nim_lib_system_io.nim
mov qword [rbp - 0x38], rax
mov qword [rbp - 0x40], 0
mov word [rbp - 0x30], 0
lea rax, [rbp - 0x50]
mov rcx, rax
call sym.nimFrame_5
mov qword [rbp - 0x10], 0
mov qword [rbp - 0x40], 8
lea rax, [0x14003b588]
mov qword [rbp - 0x38], rax
mov qword [rbp - 8], 0
mov qword [rbp - 0x40], 9
lea rax, [0x14003b588]
mov qword [rbp - 0x38], rax
mov rax, qword [rbp - 8]
cmp rax, qword [rbp + 0x28]
jge 0x1400058fb
mov qword [rbp - 0x40], 0x333
lea rax, str._usr_lib_nim_lib_system_io.nim
mov qword [rbp - 0x38], rax
cmp qword [rbp - 8], 0
js 0x14000585d
mov rax, qword [rbp - 8]
cmp rax, qword [rbp + 0x28]
jl 0x140005871
mov rax, qword [rbp + 0x28]
lea rdx, [rax - 1]
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.raiseIndexError2
mov rax, qword [rbp - 8]
lea rdx, [rax*8]
mov rax, qword [rbp + 0x20]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov rbx, qword [rax]
mov ecx, 1
mov rax, qword [dbg.__acrt_iob_func]
call rax
mov r8d, 0
mov rdx, rbx
mov rcx, rax
call sym.writeWindows__systemZio_205
mov qword [rbp - 0x40], 0xb
lea rax, [0x14003b588]
mov qword [rbp - 0x38], rax
mov edx, 0
mov rax, qword [rbp - 8]
add rax, 1
jno 0x1400058d5
mov edx, 1
mov rcx, rax
lea rax, [rbp - 0x58]
mov qword [rax], rcx
mov rax, rdx
and eax, 1
test al, al
je 0x1400058ee
call sym.raiseOverflow
mov rax, qword [rbp - 0x58]
mov qword [rbp - 8], rax
jmp 0x14000582b
nop
mov qword [rbp - 0x40], 0x339
lea rax, str._usr_lib_nim_lib_system_io.nim
mov qword [rbp - 0x38], rax
mov qword [rbp - 0x18], 0
mov ecx, 1
mov rax, qword [dbg.__acrt_iob_func]
call rax
mov r9, rax
mov r8d, 1
mov edx, 1
lea rax, [0x14003b5ae]
mov rcx, rax
call sym.fwrite
mov qword [rbp - 0x18], rax
mov qword [rbp - 0x40], 0x33a
lea rax, str._usr_lib_nim_lib_system_io.nim
mov qword [rbp - 0x38], rax
mov dword [rbp - 0x1c], 0
mov ecx, 1
mov rax, qword [dbg.__acrt_iob_func]
call rax
mov rcx, rax
call sym.fflush
mov dword [rbp - 0x1c], eax
call sym.popFrame_5
nop
add rsp, 0x88
pop rbx
pop rbp
ret

Function at 0x140007862
Capabilities:
Write file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov qword [rbp - 8], 0
cmp qword [rbp + 0x18], 0
je 0x140007892
mov rax, qword [rbp + 0x18]
mov rcx, rax
call sym.nimCStrLen_1
mov rcx, rax
jmp 0x140007897
mov ecx, 0
mov rdx, qword [rbp + 0x10]
mov rax, qword [rbp + 0x18]
mov r9, rdx
mov r8, rcx
mov edx, 1
mov rcx, rax
call sym.fwrite
mov qword [rbp - 8], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp + 0x10]
mov rcx, rax
call sym.fflush
mov dword [rbp - 0xc], eax
nop
add rsp, 0x30
pop rbp
ret
Function at 0x140032e40
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, rcx
lea rax, [rsp + 0x58]
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call dbg.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call dbg.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop dword [rax]

Function at 0x140032eb0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x14005adb4]
mov rbx, rcx
test esi, esi
jle 0x140032fe0
mov rax, qword [0x14005adb8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140032efb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140032f85
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140032ee0
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x140033002
mov rax, qword [0x14005adb8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call dbg._GetPEImageBase
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x14005adb8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140032fe7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140032f7e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140032f90
add dword [0x14005adb4], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x14005adb8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140032f7e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
nop dword [rax]
xor esi, esi
jmp 0x140032f08
mov rax, qword [0x14005adb8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call dbg.__report_error
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140033570
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x14005ae20]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14005ae00]
test rbx, rbx
je 0x1400335cc
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x1400335c3
test rsi, rsi
je 0x1400335c3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x1400335a8
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x1400337e0
Capabilities:
Parse pe header

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

Function at 0x140033810
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
movzx r8d, word [rcx + 6]
lea rax, [rcx + rax + 0x18]
test r8w, r8w
je 0x14003385d
lea ecx, [r8 - 1]
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp rdx, r8
jb 0x140033854
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x14003385f
add rax, 0x28
cmp rax, r9
jne 0x140033840
xor eax, eax
ret

Function at 0x140033860
Capabilities:
Parse pe header

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, rcx
call sym.strlen
cmp rax, 8
ja 0x1400338f0
mov rdx, qword [0x14003fc80]
xor ebx, ebx
cmp word [rdx], 0x5a4d
jne 0x1400338de
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x1400338de
cmp word [rax + 0x18], 0x20b
jne 0x1400338de
movzx edx, word [rax + 0x14]
lea rbx, [rax + rdx + 0x18]
movzx edx, word [rax + 6]
test dx, dx
je 0x1400338f0
lea eax, [rdx - 1]
lea rax, [rax + rax*4]
lea rdi, [rbx + rax*8 + 0x28]
jmp 0x1400338c9
add rbx, 0x28
cmp rbx, rdi
je 0x1400338f0
mov r8d, 8
mov rdx, rsi
mov rcx, rbx
call sym.strncmp
test eax, eax
jne 0x1400338c0
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
xor ebx, ebx
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret

Function at 0x140033900
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x14003fc80]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140033920
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140033928
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140033920
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x14003397d
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x140033974
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140033920
add rax, 0x28
cmp rax, r9
jne 0x140033960
xor eax, eax
ret

Function at 0x140033980
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x14003fc80]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x14003399f
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400339a8
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x14003399f
movzx ecx, word [rax + 6]
mov eax, ecx
ret