joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140099b40
Capabilities:
Write file on windows

Disassembly:
sub rsp, 0x38
cmp byte [rcx + 0xf1e], 0
movsxd r10, r9d
je 0x140099c64
cmp r8d, 0xff
jne 0x140099ba1
lea eax, [r10 - 0xec]
cmp eax, 0x13
ja 0x140099b8b
lea r8, [0x140000000]
mov r9, qword [r8 + r10*8 + 0xbea50]
mov r8, rdx
lea rdx, str._s_IAC__s_n
add rsp, 0x38
jmp fcn.1400764a0
mov r8, rdx
mov r9d, r10d
lea rdx, str._s_IAC__d_n
add rsp, 0x38
jmp fcn.1400764a0
cmp r8d, 0xfb
jne 0x140099bb3
lea r9, str.WILL
jmp 0x140099bf1
cmp r8d, 0xfc
jne 0x140099bc5
lea r9, str.WONT
jmp 0x140099bf1
cmp r8d, 0xfd
jne 0x140099bd7
lea r9, [0x1400bf474]
jmp 0x140099bf1
xor r9d, r9d
lea rax, str.DONT
cmp r8d, 0xfe
cmove r9, rax
test r9, r9
je 0x140099c4d
cmp r10d, 0x27
jg 0x140099c24
lea r8, [0x140000000]
mov r8, qword [r8 + r10*8 + 0xbf070]
test r8, r8
jne 0x140099c34
mov r8, rdx
mov dword [rsp + 0x20], r10d
lea rdx, str._s__s__d_n
call fcn.1400764a0
add rsp, 0x38
ret
cmp r10d, 0xff
jne 0x140099c0b
lea r8, str.EXOPL
mov qword [rsp + 0x20], r8
mov r8, rdx
lea rdx, str._s__s__s_n
call fcn.1400764a0
add rsp, 0x38
ret
mov r9d, r8d
mov dword [rsp + 0x20], r10d
mov r8, rdx
lea rdx, str._s__d__d_n
call fcn.1400764a0
add rsp, 0x38
ret

Function at 0x140099fb0
Capabilities:
Send data
Send data on socket

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
push rdi
sub rsp, 0x20
mov rbp, qword [rcx]
mov edi, r8d
mov esi, edx
mov byte [rax + 0x10], 0xff
xor r9d, r9d
mov byte [rax + 0x11], sil
mov rbx, rcx
mov byte [rax + 0x12], dil
mov rcx, qword [rcx + 0x4c0]
lea rdx, [rax + 0x10]
lea r8d, [r9 + 3]
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x14009a00f
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rbp
mov r8d, eax
call fcn.140076320
mov rcx, qword [rbx]
lea rdx, str.SENT
mov r9d, edi
mov r8d, esi
call fcn.140099b40
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret
Function at 0x14009a1c0
Capabilities:
Send data
Send data on socket

Disassembly:
cmp edx, 0x1f
jne 0x14009a368
push rbp
push rdi
push r14
sub rsp, 0x20
mov rbp, qword [rcx]
mov r14, rcx
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x58], r15
mov rdi, qword [rbp + 0x1e0]
lea rsi, [rdi + 0x1cb8]
lea rbx, [rdi + 0x1eb8]
mov qword [rbx], rsi
cmp rsi, rbx
jae 0x14009a225
lea rax, [rsi + 1]
mov byte [rsi], 0xff
mov qword [rbx], rax
cmp rax, rbx
jae 0x14009a225
mov byte [rax], 0xfa
inc qword [rbx]
mov rax, qword [rbx]
cmp rax, rbx
jae 0x14009a225
mov byte [rax], dl
inc qword [rbx]
movzx ecx, word [rdi + 0x1ca8]
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, word [rdi + 0x1caa]
movzx r15d, ax
mov word [rsp + 0x48], ax
call qword [sym.imp.WS2_32.dll_htons]
mov r9, qword [rbx]
movzx ecx, ax
cmp r9, rbx
jae 0x14009a25c
mov byte [r9], r15b
inc qword [rbx]
mov r9, qword [rbx]
mov r15, qword [rsp + 0x58]
cmp r9, rbx
jae 0x14009a2b2
movzx eax, byte [rsp + 0x49]
mov byte [r9], al
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x14009a2b2
mov byte [r9], cl
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x14009a2b2
shr cx, 8
mov byte [r9], cl
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x14009a2b2
mov byte [r9], 0xff
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x14009a2b2
mov byte [r9], 0xf0
mov r9, qword [rbx]
inc r9
mov qword [rdi + 0x1ec0], r9
lea r8, [rdi + 0x1cba]
sub r9, rsi
mov qword [rbx], rsi
sub r9, 2
mov edx, 0x3e
mov rcx, rbp
call fcn.140099c70
mov rcx, qword [r14 + 0x4c0]
xor r9d, r9d
mov rdx, rsi
lea r8d, [r9 + 3]
call qword [sym.imp.WS2_32.dll_send]
mov rsi, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x40]
test eax, eax
jns 0x14009a314
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rbp
mov r8d, eax
call fcn.140076320
lea rdx, [rdi + 0x1cbb]
mov r8d, 4
mov rcx, r14
call fcn.14009a040
mov rcx, qword [r14 + 0x4c0]
lea rdx, [rdi + 0x1cbf]
xor r9d, r9d
lea r8d, [r9 + 2]
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x14009a360
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rbp
mov r8d, eax
call fcn.140076320
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret
Function at 0x14009bad0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push rbx
push rdi
push r14
sub rsp, 0xd0
mov rax, qword [0x1400e00c0]
xor rax, rsp
mov qword [rsp + 0xc0], rax
mov rbx, qword [rcx + 0xa00]
lea rax, [rsp + 0x30]
mov rdi, qword [rcx]
mov r14, rcx
mov dword [rsp + 0x30], 0x80
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
mov r8d, dword [rbx + 0x15c]
mov rdx, qword [rbx + 0x168]
add r8d, 4
mov rcx, qword [rbx + 0x18]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [rbx + 0x150], 0
mov dword [rbx + 0x154], eax
jne 0x14009bb65
movsxd r8, dword [rsp + 0x30]
lea rcx, [rbx + 0xd0]
lea rdx, [rsp + 0x40]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [rsp + 0x30]
mov dword [rbx + 0x150], eax
mov r8d, dword [rbx + 0x154]
mov qword [rsp + 0xf8], rbp
mov qword [rsp + 0x100], rsi
cmp r8d, 4
jge 0x14009bbc6
lea rdx, str.Received_too_short_packet
mov rcx, rdi
call fcn.140076320
mov dword [rbx + 0xc], 7
xor eax, eax
mov rsi, qword [rsp + 0x100]
mov rbp, qword [rsp + 0xf8]
mov rcx, qword [rsp + 0xc0]
xor rcx, rsp
call fcn.1400af460
add rsp, 0xd0
pop r14
pop rdi
pop rbx
ret
mov rdx, qword [rbx + 0x168]
movzx eax, byte [rdx]
movzx ecx, byte [rdx + 1]
shl eax, 8
or ecx, eax
mov dword [rbx + 0xc], ecx
sub ecx, 3
je 0x14009bc81
sub ecx, 1
je 0x14009bcf4
sub ecx, 1
je 0x14009bc30
cmp ecx, 1
je 0x14009bc13
lea r8, str.Internal_error:_Unexpected_packet
mov rcx, rdi
lea rdx, [0x1400c7800]
call fcn.140076320
jmp 0x14009bcf4
add r8d, 0xfffffffe
add rdx, 2
mov rcx, rbx
call fcn.14009b800
test eax, eax
je 0x14009bcf4
jmp 0x14009bb9a
movzx ecx, byte [rdx + 2]
lea eax, [r8 - 4]
movsxd rbp, eax
lea rsi, [rdx + 4]
movzx eax, byte [rdx + 3]
mov r8, rbp
shl ecx, 8
xor edx, edx
or ecx, eax
mov dword [rbx + 8], ecx
mov rcx, rsi
call sub.VCRUNTIME140.dll_memchr
test rax, rax
je 0x14009bcf4
sub rax, rsi
cmp rax, rbp
jae 0x14009bcf4
mov r8, rsi
lea rdx, str.TFTP_error:__s_n
mov rcx, rdi
call fcn.1400764a0
jmp 0x14009bcf4
cmp r8d, 4
jle 0x14009bcf4
movzx eax, byte [rdx + 3]
movzx ecx, byte [rdx + 2]
shl ecx, 8
or ecx, eax
movzx eax, word [rbx + 0x48]
inc eax
movzx eax, ax
cmp eax, ecx
jne 0x14009bcf4
lea eax, [r8 - 4]
mov rcx, r14
lea r8, [rdx + 4]
movsxd r9, eax
mov edx, 1
call fcn.140076240
mov esi, eax
test eax, eax
je 0x14009bcd3
mov edx, 5
mov rcx, rbx
call fcn.14009c7c0
mov eax, esi
jmp 0x14009bb9a
mov eax, dword [rbx + 0x154]
mov rcx, rdi
sub eax, 4
cdqe
add qword [rdi + 0xf8], rax
mov rdx, qword [rdi + 0xf8]
call fcn.140084bf0
mov rcx, r14
call fcn.140084ed0
test eax, eax
je 0x14009bb98
mov edx, 5
mov rcx, rbx
call fcn.14009c7c0
mov eax, Ordinal_46
jmp 0x14009bb9a
Function at 0x1400aea90
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rdi
push r14
sub rsp, 0x20
mov eax, dword [rcx + 0x18]
mov rbx, rcx
mov ebp, r8d
mov r14, rdx
lea ecx, [rax + rax]
mov eax, dword [rbx + 0x20]
add rax, 0x18
add rcx, rax
call qword [sub.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
test rax, rax
jne 0x1400aead2
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret
lea rcx, [rax + 0x18]
mov qword [rax], rbx
mov qword [rax + 8], rcx
mov eax, dword [rbx + 0x18]
add rax, rcx
mov qword [rsp + 0x48], rsi
mov qword [rdi + 0x10], rax
cmp ebp, dword [rbx + 0x1c]
jbe 0x1400aeb19
call qword [rbx]
mov rcx, qword [rdi + 8]
mov r8d, ebp
mov rdx, r14
call qword [rbx + reloc.WS2_32.dll_htonl]
mov r14d, dword [rbx + 0x18]
add r14, qword [rdi + 0x10]
mov rdx, qword [rdi + 8]
mov rcx, r14
call qword [rbx + reloc.WS2_32.dll_recv]
mov rcx, qword [rdi + 8]
mov ebp, dword [rbx + 0x20]
call qword [rbx]
mov rcx, qword [rdi + 0x10]
call qword [rbx]
xor esi, esi
test rbp, rbp
je 0x1400aeb72
mov rsi, rbp
nop dword [rax + rax]
movzx eax, byte [r14]
lea rdx, [rsp + 0x40]
xor al, 0x36
mov r8d, 1
mov byte [rsp + 0x40], al
mov rcx, qword [rdi + 8]
call qword [rbx + reloc.WS2_32.dll_htonl]
movzx eax, byte [r14]
lea rdx, [rsp + 0x40]
xor al, 0x5c
lea r14, [r14 + 1]
mov byte [rsp + 0x40], al
mov r8d, 1
mov rcx, qword [rdi + 0x10]
call qword [rbx + reloc.WS2_32.dll_htonl]
sub rbp, 1
jne 0x1400aeb30
mov eax, dword [rbx + 0x1c]
cmp rsi, rax
jae 0x1400aebb3
nop word [rax + rax]
mov rcx, qword [rdi + 8]
lea rdx, [0x1400c2642]
mov r8d, 1
call qword [rbx + reloc.WS2_32.dll_htonl]
mov rcx, qword [rdi + 0x10]
lea rdx, [0x1400c2643]
mov r8d, 1
call qword [rbx + reloc.WS2_32.dll_htonl]
mov eax, dword [rbx + 0x1c]
inc rsi
cmp rsi, rax
jb 0x1400aeb80
mov rsi, qword [rsp + 0x48]
mov rax, rdi
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret

Function at 0x1400afae8
Capabilities:
Parse pe header

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

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x40
mov rbx, rdx
lea r8, [rsp + 0x60]
mov edi, ecx
mov edx, 0x20000001
lea rcx, str._x_sys_default_locale
mov r9d, 2
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
test eax, eax
jne 0x1400afd6e
xor r9d, r9d
mov dword [rsp + 0x60], r9d
jmp 0x1400afd73
mov r9d, dword [rsp + 0x60]
and qword [rsp + 0x30], 0
mov r8d, edi
and dword [rsp + 0x28], 0
xor edx, edx
mov ecx, 0x1300
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, eax
test eax, eax
je 0x1400afdbc
mov r8, qword [rbx]
dec r8
add r8, rdx
movzx ecx, byte [r8]
lea rax, reloc.WS2_32.dll_accept
cmp byte [rcx + rax], 0
je 0x1400afdbc
dec r8
sub rdx, 1
jne 0x1400afda2
mov rbx, qword [rsp + 0x50]
mov rax, rdx
add rsp, 0x40
pop rdi
ret
Function at 0x1400025f0
Capabilities:
Execute command

Disassembly:
sub rsp, 0x98
mov rax, qword [0x140007040]
xor rax, rsp
mov qword [rsp + 0x80], rax
lea rcx, str.Spoofing_process_started__Please_do_not_touch_your_keyboard__n
call fcn.140001020
xorps xmm0, xmm0
movups xmmword [rsp + 0x60], xmm0
movdqa xmm1, xmmword [0x1400048d0]
movdqu xmmword [rsp + 0x70], xmm1
mov byte [rsp + 0x60], 0
movups xmmword [rsp + 0x40], xmm0
movdqu xmmword [rsp + 0x50], xmm1
mov byte [rsp + 0x40], 0
lea rdx, str.Enter_motherboard_brand:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140001900
lea rdx, [rsp + 0x60]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
call fcn.140001b20
lea rdx, str.Enter_motherboard_model:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140001900
lea rdx, [rsp + 0x40]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
call fcn.140001b20
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x30], xmm1
mov ecx, 0x20
call fcn.140002c40
mov qword [rsp + 0x20], rax
movdqa xmm0, xmmword [0x1400048f0]
movdqu xmmword [rsp + 0x30], xmm0
movups xmm0, xmmword [str.NewSerialNumberHere]
movups xmmword [rax], xmm0
movzx ecx, word [0x140004820]
mov word [rax + 0x10], cx
movzx ecx, byte [0x140004822]
mov byte [rax + 0x12], cl
mov byte [rax + 0x13], 0
lea rcx, [rsp + 0x20]
call fcn.140001f30
nop
mov rdx, qword [rsp + 0x38]
cmp rdx, 0xf
jbe 0x140002724
inc rdx
mov rcx, qword [rsp + 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000271f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000271f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140002c7c
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x60]
call fcn.140002170
lea rcx, str.C:AMIDEWINx64.EXE__SU_auto
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
mov r9d, 0x40
lea r8, str.Information
lea rdx, str.Spoofed_Successfully_
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxA]
nop
mov rdx, qword [rsp + 0x58]
cmp rdx, 0xf
jbe 0x14000279e
inc rdx
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002798
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002798
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140002c7c
nop
mov rdx, qword [rsp + 0x78]
cmp rdx, 0xf
jbe 0x1400027de
inc rdx
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400027d9
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400027d9
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140002c7c
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.140002c20
add rsp, 0x98
ret
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x00415980]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x00415990]
mov dword [rax], 1
mov rax, qword [0x004159a0]
mov dword [rax], 1
mov rax, qword [0x00415970]
mov dword [rax], 1
mov rax, qword [0x00415840]
cmp word [rax], 0x5a4d
je 0x4010b0
mov rax, qword [0x00415960]
mov dword [0x00418008], edx
mov eax, dword [rax]
test eax, eax
je 0x4010a0
mov ecx, 2
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x00415900]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x004157f0]
cmp dword [rax], 1
je 0x4010f0
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x401075
movsxd rcx, dword [rax + 0x3c]
add rax, rcx
cmp dword [rax], 0x4550
jne 0x401058
movzx ecx, word [rax + 0x18]
cmp cx, 0x10b
je 0x401103
cmp cx, 0x20b
jne 0x401058
cmp dword [rax + 0x84], 0xe
jbe 0x401058
mov ecx, dword [rax + 0xf8]
xor edx, edx
test ecx, ecx
setne dl
jmp 0x401058
lea rcx, [sym._matherr]
call sym.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x401058
mov r8d, dword [rax + 0xe8]
xor edx, edx
test r8d, r8d
setne dl
jmp 0x401058
Function at 0x402b80
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.C:_nim_1.6.6lib_systemio.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_2
mov qword [rbp - 0x10], 0
mov qword [rbp - 0x40], 8
lea rax, str.C:_nim_1.6.6lib_systemiterators.nim
mov qword [rbp - 0x38], rax
mov qword [rbp - 8], 0
mov qword [rbp - 0x40], 9
lea rax, str.C:_nim_1.6.6lib_systemiterators.nim
mov qword [rbp - 0x38], rax
mov rax, qword [rbp - 8]
cmp rax, qword [rbp + 0x28]
jge 0x402ccf
mov qword [rbp - 0x40], 0x332
lea rax, str.C:_nim_1.6.6lib_systemio.nim
mov qword [rbp - 0x38], rax
cmp qword [rbp - 8], 0
js 0x402c31
mov rax, qword [rbp - 8]
cmp rax, qword [rbp + 0x28]
jl 0x402c45
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 [sym.__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, str.C:_nim_1.6.6lib_systemiterators.nim
mov qword [rbp - 0x38], rax
mov edx, 0
mov rax, qword [rbp - 8]
add rax, 1
jno 0x402ca9
mov edx, 1
mov rcx, rax
lea rax, [rbp - 0x58]
mov qword [rax], rcx
mov rax, rdx
and eax, 1
test al, al
je 0x402cc2
call sym.raiseOverflow
mov rax, qword [rbp - 0x58]
mov qword [rbp - 8], rax
jmp 0x402bff
nop
mov qword [rbp - 0x40], 0x338
lea rax, str.C:_nim_1.6.6lib_systemio.nim
mov qword [rbp - 0x38], rax
mov dword [rbp - 0x14], 0
mov ecx, 1
mov rax, qword [sym.__acrt_iob_func]
call rax
mov r9, rax
mov r8d, 1
mov edx, 1
lea rcx, [0x0041433e]
call sym.fwrite
mov dword [rbp - 0x14], eax
mov qword [rbp - 0x40], 0x339
lea rax, str.C:_nim_1.6.6lib_systemio.nim
mov qword [rbp - 0x38], rax
mov dword [rbp - 0x18], 0
mov ecx, 1
mov rax, qword [sym.__acrt_iob_func]
call rax
mov rcx, rax
call sym.fflush
mov dword [rbp - 0x18], eax
call sym.popFrame_2
nop
add rsp, 0x88
pop rbx
pop rbp
ret

Function at 0x404ab7
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 dword [rbp - 4], 0
cmp qword [rbp + 0x18], 0
je 0x404ae6
mov rax, qword [rbp + 0x18]
mov rcx, rax
call sym.nimCStrLen
mov rdx, rax
jmp 0x404aeb
mov edx, 0
mov rax, qword [rbp + 0x18]
mov r9, qword [rbp + 0x10]
mov r8, rdx
mov edx, 1
mov rcx, rax
call sym.fwrite
mov dword [rbp - 4], eax
mov dword [rbp - 8], 0
mov rcx, qword [rbp + 0x10]
call sym.fflush
mov dword [rbp - 8], eax
nop
add rsp, 0x30
pop rbp
ret
Function at 0x40d00a
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 dword [rbp - 4], 0
mov rdx, qword [rbp + 0x20]
mov rax, qword [rbp + 0x18]
mov r9, qword [rbp + 0x10]
mov r8, rdx
mov edx, 1
mov rcx, rax
call sym.fwrite
mov dword [rbp - 4], eax
mov dword [rbp - 8], 0
mov rcx, qword [rbp + 0x10]
call sym.fflush
mov dword [rbp - 8], eax
nop
add rsp, 0x30
pop rbp
ret

Function at 0x411920
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x00418a44]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x411aa8
mov rax, qword [0x00418a48]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x41196c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x4119f5
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x411950
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x411add
mov rax, qword [0x00418a48]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call sym._GetPEImageBase
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x00418a48]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x411ac0
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x4119ee
sub eax, 0x40
and eax, 0xffffffbf
jne 0x411a50
add dword [0x00418a44], 1
cmp edi, 8
jae 0x411a23
test dil, 4
jne 0x411a94
test edi, edi
je 0x411a18
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x411aaf
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, edi
sub edi, 1
mov rdx, qword [rbp + rax - 8]
cmp edi, 8
mov qword [rbx + rax - 8], rdx
jb 0x411a18
and edi, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov rcx, qword [rbp + rdx]
cmp eax, edi
mov qword [rbx + rdx], rcx
jb 0x411a3c
jmp 0x411a18
add rsi, qword [0x00418a48]
mov r8d, 0x40
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r9, rsi
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x4119ee
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x411a18
xor esi, esi
jmp 0x411977
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x411a18
mov rax, qword [0x00418a48]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call sym.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call sym.__report_error
nop
nop dword [rax]
Function at 0x412230
Capabilities:
Get thread local storage value

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

Function at 0x4124c0
Capabilities:
Parse pe header

Disassembly:
cmp word [rcx], 0x5a4d
je 0x4124d0
xor eax, eax
ret
jmp sym._ValidateImageBase.part.0

Function at 0x4124e0
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
lea rax, [rcx + rax + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x412521
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
mov r8d, dword [rax + 0xc]
cmp r8, rdx
mov rcx, r8
ja 0x412518
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x412523
add rax, 0x28
cmp rax, r9
jne 0x412504
xor eax, eax
ret

Function at 0x4125c0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x00415840]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x41262d
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x41262d
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x41262d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x412624
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x41262f
add rax, 0x28
cmp rax, r9
jne 0x412610
xor eax, eax
add rsp, 0x28
ret

Function at 0x412730
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x00415840]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x412750
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x412748
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x4127ad
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x4127a4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x4127b4
add rax, 0x28
cmp rax, r9
jne 0x412790
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret