joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14005b940
Capabilities:
Receive data
Receive data on socket

Disassembly:
push rbx
push rdi
push r14
sub rsp, 0xd0
mov rax, qword [0x14008f088]
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 0x14005b9d5
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 0x14005ba36
lea rdx, str.Received_too_short_packet
mov rcx, rdi
call fcn.140036240
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.14006ec60
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 0x14005baf1
sub ecx, 1
je 0x14005bb64
sub ecx, 1
je 0x14005baa0
cmp ecx, 1
je 0x14005ba83
lea r8, str.Internal_error:_Unexpected_packet
mov rcx, rdi
lea rdx, [0x14007cad0]
call fcn.140036240
jmp 0x14005bb64
add r8d, 0xfffffffe
add rdx, 2
mov rcx, rbx
call fcn.14005b670
test eax, eax
je 0x14005bb64
jmp 0x14005ba0a
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 0x14005bb64
sub rax, rsi
cmp rax, rbp
jae 0x14005bb64
mov r8, rsi
lea rdx, str.TFTP_error:__s_n
mov rcx, rdi
call fcn.1400363c0
jmp 0x14005bb64
cmp r8d, 4
jle 0x14005bb64
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 0x14005bb64
lea eax, [r8 - 4]
mov rcx, r14
lea r8, [rdx + 4]
movsxd r9, eax
mov edx, 1
call fcn.140036160
mov esi, eax
test eax, eax
je 0x14005bb43
mov edx, 5
mov rcx, rbx
call fcn.14005c630
mov eax, esi
jmp 0x14005ba0a
mov eax, dword [rbx + 0x154]
mov rcx, rdi
sub eax, 4
cdqe
add qword [rdi + 0xf8], rax
mov rdx, qword [rdi + 0xf8]
call fcn.140044a60
mov rcx, r14
call fcn.140044d40
test eax, eax
je 0x14005ba08
mov edx, 5
mov rcx, rbx
call fcn.14005c630
mov eax, Ordinal_46
jmp 0x14005ba0a
Function at 0x14006e900
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 0x14006e942
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 0x14006e989
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 0x14006e9e2
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 0x14006e9a0
mov eax, dword [rbx + 0x1c]
cmp rsi, rax
jae 0x14006ea23
nop word [rax + rax]
mov rcx, qword [rdi + 8]
lea rdx, [0x14008225a]
mov r8d, 1
call qword [rbx + reloc.WS2_32.dll_htonl]
mov rcx, qword [rdi + 0x10]
lea rdx, [0x14008225b]
mov r8d, 1
call qword [rbx + reloc.WS2_32.dll_htonl]
mov eax, dword [rbx + 0x1c]
inc rsi
cmp rsi, rax
jb 0x14006e9f0
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 0x14006f944
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14006f98e
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14006f98e
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14006f98e
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14006f98e
cmp dword [rcx + 0x84], 0xe
jbe 0x14006f98e
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x14006f990
xor al, al
add rsp, 0x28
ret
Function at 0x140001000
Capabilities:
Access peb ldr_data
Encode data using xor
Get ntdll base address
Resolve function by parsing pe exports

Disassembly:
push r12
sub rsp, 0x20
cmp dword [0x14000e660], 0
jne 0x1400011fe
mov rax, qword gs:[0x60]
xor r12d, r12d
mov edx, r12d
mov rcx, qword [rax + 0x18]
mov r8, qword [rcx + 0x10]
mov rax, qword [r8 + 0x30]
test rax, rax
je 0x14000120a
nop word [rax + rax]
mov r11, rax
movsxd rax, dword [rax + 0x3c]
mov ecx, dword [rax + r11 + 0x88]
test ecx, ecx
je 0x14000107d
lea rdx, [r11 + rcx]
mov ecx, dword [r11 + rcx + 0xc]
mov eax, dword [rcx + r11]
or eax, 0x20202020
cmp eax, 0x6c64746e
jne 0x14000107d
mov eax, dword [rcx + r11 + 4]
or eax, 0x20202020
cmp eax, 0x6c642e6c
je 0x140001089
mov r8, qword [r8]
mov rax, qword [r8 + 0x30]
test rax, rax
jne 0x140001040
test rdx, rdx
je 0x14000120a
mov qword [rsp + 0x30], rbx
mov ebx, dword [rdx + 0x18]
mov qword [rsp + 0x38], rbp
mov ebp, dword [rdx + 0x24]
mov qword [rsp + 0x40], rsi
mov esi, dword [rdx + 0x20]
mov qword [rsp + 0x18], rdi
add rsi, r11
mov qword [rsp + 0x10], r13
mov r13d, 0x775a
mov qword [rsp + 8], r14
mov r14d, dword [rdx + 0x1c]
mov edx, r12d
add r14, r11
mov qword [rsp], r15
add rbp, r11
lea r15, [0x14000e660]
nop word [rax + rax]
dec ebx
mov r10d, dword [rsi + rbx*4]
add r10, r11
cmp word [r10], r13w
jne 0x140001143
mov r9d, r12d
mov r8d, 0xef94f983
mov rax, r10
nop dword [rax + rax]
movzx eax, word [rax]
mov ecx, r8d
ror ecx, 8
inc r9d
add ecx, eax
mov eax, r9d
add rax, r10
xor r8d, ecx
cmp byte [rax], r12b
jne 0x140001100
mov ecx, edx
inc edx
add rcx, rcx
mov dword [r15 + rcx*8 + 8], r8d
movzx eax, word [rbp + rbx*2]
mov eax, dword [r14 + rax*4]
mov dword [r15 + rcx*8 + 0xc], eax
mov qword [r15 + rcx*8 + 0x10], r12
cmp edx, 0x1f4
je 0x140001147
test ebx, ebx
jne 0x1400010e0
mov r14, qword [rsp + 8]
lea eax, [rdx - 1]
mov r13, qword [rsp + 0x10]
mov r11d, r12d
mov rsi, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x38]
mov dword [0x14000e660], edx
test eax, eax
je 0x1400011f0
nop
mov ecx, edx
mov eax, r12d
sub ecx, r11d
cmp ecx, 1
je 0x1400011e5
nop dword [rax]
lea r10d, [rax + 1]
mov r9d, eax
add r9, r9
mov r8d, r10d
add r8, r8
mov edi, dword [r15 + r9*8 + 0xc]
mov ebx, dword [r15 + r8*8 + 0xc]
cmp edi, ebx
jbe 0x1400011d6
mov edx, dword [r15 + r9*8 + 8]
mov eax, dword [r15 + r8*8 + 8]
mov rcx, qword [r15 + r9*8 + 0x10]
mov dword [r15 + r9*8 + 8], eax
mov rax, qword [r15 + r8*8 + 0x10]
mov qword [r15 + r9*8 + 0x10], rax
mov dword [r15 + r9*8 + 0xc], ebx
mov dword [r15 + r8*8 + 8], edx
mov dword [r15 + r8*8 + 0xc], edi
mov qword [r15 + r8*8 + 0x10], rcx
mov edx, dword [0x14000e660]
mov ecx, edx
mov eax, r10d
sub ecx, r11d
dec ecx
cmp r10d, ecx
jb 0x140001180
inc r11d
lea eax, [rdx - 1]
cmp r11d, eax
jb 0x140001170
mov rdi, qword [rsp + 0x18]
mov rbx, qword [rsp + 0x30]
mov r15, qword [rsp]
mov eax, 1
add rsp, 0x20
pop r12
ret
xor eax, eax
add rsp, 0x20
pop r12
ret
Function at 0x140001ab8
Capabilities:
Execute syscall

Disassembly:
mov qword [rsp + 8], rcx
pop rcx
push rdx
mov qword [rsp + 0x10], rdx
pop rdx
push r8
mov qword [rsp + 0x18], r8
pop r8
push r9
mov qword [rsp + 0x20], r9
pop r9
sub rsp, 0x30
mov ecx, 0xb99011b
call fcn.140001220
add rsp, 0x30
push rcx
mov rcx, qword [rsp + 8]
pop rcx
push rdx
mov rdx, qword [rsp + 0x10]
pop rdx
push r8
mov r8, qword [rsp + 0x18]
pop r8
push r9
mov r9, qword [rsp + 0x20]
pop r9
mov r10, rcx
syscall
ret
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x1400345e0]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x1400345f0]
mov dword [rax], 1
mov rax, qword [0x140034600]
mov dword [rax], 1
mov rax, qword [0x140034580]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x1400345d0]
mov dword [0x14003a020], 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 [0x1400346b0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x140034690]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x140034470]
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 0x140001670
Capabilities:
Query environment variable
Read file on windows

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x60
mov rbx, qword [0x140034540]
cmp byte [rbx], 0
jne 0x140001810
mov rcx, qword [0x140034530]
call sym.__gmp_randinit_default
lea rcx, str.GMP_CHECK_RANDOMIZE
mov byte [rbx], 1
call sym.getenv
test rax, rax
mov rdx, rax
je 0x1400017c0
movzx eax, byte [rax]
cmp eax, 0x30
je 0x140001710
cmp eax, 0x31
je 0x1400017c8
lea rbx, [rsp + 0x50]
xor r8d, r8d
mov rcx, rbx
call sym.__gmpz_init_set_str
lea rcx, str.Re_seeding_with_GMP_CHECK_RANDOMIZE_Zd_n
mov rdx, rbx
call sym.__gmp_printf
mov rcx, qword [0x140034530]
mov rdx, rbx
call sym.__gmp_randseed
mov rcx, rbx
call sym.__gmpz_clear
mov ecx, 1
call qword [dbg.__acrt_iob_func]
mov rcx, rax
add rsp, 0x60
pop rbx
pop rsi
pop rdi
jmp sym.fflush
cmp byte [rdx + 1], 0
jne 0x1400016b6
lea rdx, [0x14002efd1]
lea rcx, str._dev_urandom
call sym.fopen
test rax, rax
mov rbx, rax
je 0x1400017d8
lea rdi, [rsp + 0x4a]
lea rsi, [rsp + 0x50]
mov r9, rax
mov r8d, 6
mov edx, 1
mov rcx, rdi
call sym.fread
mov rcx, rsi
call sym.__gmpz_init
mov r9d, 1
mov r8d, 1
mov rcx, rsi
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x28], 0
mov edx, 6
mov dword [rsp + 0x20], 0
call sym.__gmpz_import
mov rcx, qword [0x140034530]
mov rdx, rsi
call sym.__gmp_randseed
lea rcx, str.Seed_GMP_CHECK_RANDOMIZE_Zd__include_this_in_bug_reports__n
mov rdx, rsi
call sym.__gmp_printf
mov rcx, rsi
call sym.__gmpz_clear
mov rcx, rbx
call sym.fclose
jmp 0x1400016f5
add rsp, 0x60
pop rbx
pop rsi
pop rdi
ret
cmp byte [rdx + 1], 0
je 0x140001716
jmp 0x1400016bf
lea rcx, [rsp + 0x50]
xor edx, edx
call dbg.gettimeofday
mov ebx, dword [rsp + 0x54]
mov rcx, qword [0x140034530]
shl ebx, 0xc
xor ebx, dword [rsp + 0x50]
mov edx, ebx
call sym.__gmp_randseed_ui
lea rcx, str.Seed_GMP_CHECK_RANDOMIZE_lu__include_this_in_bug_reports__n
mov edx, ebx
call sym.printf_1
jmp 0x1400016f5
lea rcx, str.Please_let_tests_start___initialize_the_global___gmp_rands._n
call sym.printf_1
lea rcx, str.ie._ensure_that_function_is_called_before_the_first_use_of_RANDS._n
call sym.printf_1
call sym.abort
nop
nop
Function at 0x1400033b0
Capabilities:
Write file on windows

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x48
lea rbp, [rsp + 0x40]
mov eax, 0xa
test edx, edx
mov edi, edx
mov rsi, rcx
cmove edi, eax
test r8, r8
mov qword [rbp - 8], 0
jne 0x14000340b
mov rdx, qword [0x140034570]
mov ebx, dword [r9]
movsxd rax, edi
lea rax, [rax + rax*4]
lea rax, [rdx + rax*8]
lea edx, [rbx - 1]
movsxd rdx, edx
mov rax, qword [rax + 8]
shl rdx, 6
mul rdx
lea r8, [rdx + 2]
test rsi, rsi
je 0x140003538
lea rdx, [r8 + 2]
cmp rdx, 0x7f00
ja 0x140003568
lea rax, [r8 + 0x11]
and rax, 0xfffffffffffffff0
call fcn.140026e80
sub rsp, rax
lea r12, [rsp + 0x30]
lea rdx, [rbp - 0xc]
mov qword [rsp + 0x20], r9
mov rcx, r12
mov r9, r8
mov r8d, edi
xor r14d, r14d
call sym.__gmpf_get_str
mov rcx, r12
call sym.strlen
cmp byte [r12], 0x2d
mov rbx, rax
je 0x140003518
call qword [sym.imp.msvcrt.dll_localeconv]
mov r15, qword [rax]
mov rcx, r15
call sym.strlen
mov rdx, rsi
mov r13, rax
mov ecx, 0x30
call sym.putc
mov r9, rsi
mov r8, r13
mov edx, 1
mov rcx, r15
call sym.fwrite
mov r8, rbx
mov rcx, r12
mov r9, rsi
mov edx, 1
call sym.fwrite
mov r8d, dword [rbp - 0xc]
lea rdx, str.__ld
mov r12, rax
lea rax, str.e_ld
cmp edi, 0xa
mov rcx, rsi
cmovle rdx, rax
call sym.fprintf_4
mov rcx, qword [rbp - 8]
movsxd rbx, eax
test rcx, rcx
jne 0x140003590
mov rcx, rsi
call sym.ferror
mov edx, eax
xor eax, eax
test edx, edx
jne 0x140003500
lea rax, [r14 + r13 + 1]
add rax, r12
add rax, rbx
lea rsp, [rbp + 8]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov rdx, rsi
mov ecx, 0x2d
inc r12
dec rbx
mov r14d, 1
call sym.fputc
jmp 0x14000346a
mov qword [rbp + 0x68], r9
mov qword [rbp + 0x60], r8
mov ecx, 1
call qword [dbg.__acrt_iob_func]
mov r8, qword [rbp + 0x60]
mov r9, qword [rbp + 0x68]
mov rsi, rax
lea rdx, [r8 + 2]
cmp rdx, 0x7f00
jbe 0x140003425
nop
lea rcx, [rbp - 8]
mov qword [rbp + 0x68], r9
mov qword [rbp + 0x60], r8
call sym.__gmp_tmp_reentrant_alloc
mov r9, qword [rbp + 0x68]
mov r8, qword [rbp + 0x60]
mov r12, rax
jmp 0x14000343a
call sym.__gmp_tmp_reentrant_free
jmp 0x1400034e5
Function at 0x140003f90
Capabilities:
Write file on windows

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x48
lea rbp, [rsp + 0x40]
mov r14d, dword [r8 + 4]
test rcx, rcx
mov rbx, rcx
mov r12d, edx
mov r15, r8
je 0x140004170
cmp r12d, 1
jle 0x140004150
lea r8d, [r12 - 1]
lea rdi, [0x14002f5d0]
and r8d, r12d
cmp r12d, 0x24
jg 0x140004110
xor esi, esi
test r14d, r14d
js 0x140004128
mov rdx, qword [0x140034570]
movsxd rax, r12d
mov qword [rbp - 8], 0
lea rax, [rax + rax*4]
lea rax, [rdx + rax*8]
movsxd rdx, r14d
shl rdx, 6
mov rax, qword [rax + 8]
mul rdx
lea rax, [rdx + 3]
cmp rax, 0x7f00
ja 0x1400041b0
lea rax, [rdx + 0x12]
and rax, 0xfffffffffffffff0
call fcn.140026e80
sub rsp, rax
lea r13, [rsp + 0x20]
test r8d, r8d
mov rcx, qword [r15 + 8]
je 0x140004081
mov edx, r14d
or edx, 1
movsxd rdx, edx
shl rdx, 3
cmp rdx, 0x7f00
ja 0x1400041da
lea rax, [rdx + 0xf]
and rax, 0xfffffffffffffff0
call fcn.140026e80
sub rsp, rax
mov rdx, rcx
lea rcx, [rsp + 0x20]
mov r8d, r14d
mov qword [rbp - 0x18], rcx
call sym.__gmpn_copyi
mov rcx, qword [rbp - 0x18]
mov r8, rcx
mov edx, r12d
mov rcx, r13
mov r9d, r14d
call sym.__gmpn_get_str
test rax, rax
lea rcx, [rax + r13]
mov r8, rax
mov rdx, r13
je 0x1400040bd
nop dword [rax]
movzx r10d, byte [rdx]
inc rdx
movzx r10d, byte [rdi + r10]
mov byte [rdx - 1], r10b
cmp rcx, rdx
jne 0x1400040a8
mov rcx, r13
mov byte [r13 + r8], 0
mov r9, rbx
mov edx, 1
call sym.fwrite
mov rcx, qword [rbp - 8]
mov rdi, rax
test rcx, rcx
jne 0x1400041d0
mov rcx, rbx
call sym.ferror
test eax, eax
je 0x140004108
xor eax, eax
lea rsp, [rbp + 8]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
lea rax, [rsi + rdi]
jmp 0x1400040f1
cmp r12d, 0x3e
lea rdi, [0x14002f590]
jg 0x1400040ef
xor esi, esi
test r14d, r14d
jns 0x140003fe9
mov rdx, rbx
mov ecx, 0x2d
mov dword [rbp - 0x18], r8d
neg r14d
mov esi, 1
call sym.fputc
mov r8d, dword [rbp - 0x18]
jmp 0x140003fe9
cmp r12d, 0xffffffff
jl 0x140004188
lea rdi, [0x14002f590]
mov r8d, 8
mov r12d, 0xa
jmp 0x140003fde
mov ecx, 1
call qword [dbg.__acrt_iob_func]
mov rbx, rax
jmp 0x140003fbb
mov eax, r12d
neg eax
cmp r12d, 0xffffffdc
jl 0x1400040ef
mov r8d, r12d
lea rdi, [0x14002f590]
mov r12d, eax
not r8d
and r8d, eax
jmp 0x140003fde
lea rcx, [rbp - 8]
mov rdx, rax
mov dword [rbp - 0x18], r8d
call sym.__gmp_tmp_reentrant_alloc
mov r8d, dword [rbp - 0x18]
mov r13, rax
jmp 0x140004036
call sym.__gmp_tmp_reentrant_free
jmp 0x1400040e3
lea rcx, [rbp - 8]
call sym.__gmp_tmp_reentrant_alloc
mov rdx, qword [r15 + 8]
mov rcx, rax
jmp 0x140004071
Function at 0x14001a760
Capabilities:
Write file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x120
mov r9d, edx
mov edx, 0x100
lea rsi, [rsp + 0x20]
cmp r8d, edx
mov rbx, rcx
mov ebp, r8d
cmovbe edx, r8d
mov rdi, rsi
cmp edx, 8
jb 0x14001a7a9
movabs rcx, 0x101010101010101
movzx eax, r9b
imul rax, rcx
mov ecx, edx
shr ecx, 3
rep stosq qword [rdi], rax
and edx, 7
je 0x14001a7bc
xor eax, eax
mov ecx, eax
inc eax
cmp eax, edx
mov byte [rdi + rcx], r9b
jb 0x14001a7b0
test ebp, ebp
jle 0x14001a820
lea eax, [rbp - 1]
lea edi, [rbp - 0x100]
mov r12d, ebp
xor al, al
sub edi, eax
jmp 0x14001a7e4
sub r12d, 0x100
cmp r12d, edi
je 0x14001a820
mov r8d, 0x100
mov edx, 1
mov r9, rbx
cmp r12d, r8d
mov rcx, rsi
cmovle r8d, r12d
movsxd r8, r8d
call sym.fwrite
mov edx, eax
inc eax
jne 0x14001a7d8
mov eax, edx
add rsp, 0x120
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov edx, ebp
mov eax, edx
add rsp, 0x120
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret

Function at 0x14001a840
Capabilities:
Write file on windows

Disassembly:
sub rsp, 0x28
mov r9, rcx
mov rcx, rdx
mov edx, 1
call sym.fwrite
add rsp, 0x28
ret

Function at 0x14001aff0
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
push rbx
mov r9d, dword [rcx]
lea rbx, [rcx + 0x38c]
mov r10, rcx
mov rdx, rcx
nop dword [rax]
mov eax, r9d
mov r9d, dword [rcx + 4]
and eax, 0x80000000
mov r8d, r9d
and r8d, 0x7fffffff
or r8d, eax
mov eax, r8d
shr eax, 1
xor eax, dword [rcx + 0x634]
mov r11d, eax
xor r11d, 0x9908b0df
and r8d, 1
cmovne eax, r11d
add rcx, 4
mov dword [rcx - 4], eax
cmp rcx, rbx
jne 0x14001b008
mov r8d, dword [r10 + 0x38c]
lea r11, [r10 + 0x630]
mov eax, r8d
mov r8d, dword [rdx + 0x390]
and eax, 0x80000000
mov ecx, r8d
and ecx, 0x7fffffff
or ecx, eax
mov eax, ecx
shr eax, 1
xor eax, dword [rdx]
mov r9d, eax
xor r9d, 0x9908b0df
and ecx, 1
cmovne eax, r9d
add rdx, 4
mov dword [rdx + 0x388], eax
cmp rdx, r11
jne 0x14001b058
mov edx, dword [r10 + 0x9bc]
mov eax, dword [r10]
and edx, 0x80000000
and eax, 0x7fffffff
or edx, eax
mov eax, edx
shr eax, 1
xor eax, dword [r10 + 0x630]
mov ecx, eax
xor ecx, 0x9908b0df
and edx, 1
cmovne eax, ecx
mov dword [r10 + 0x9bc], eax
pop rbx
ret
Function at 0x1400260e0
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_1
call sym.abort
nop
nop dword [rax]

Function at 0x140026150
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x14003a234]
mov rbx, rcx
test esi, esi
jle 0x140026280
mov rax, qword [0x14003a238]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14002619b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140026225
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140026180
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x1400262a2
mov rax, qword [0x14003a238]
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 [0x14003a238]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140026287
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14002621e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140026230
add dword [0x14003a234], 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 [0x14003a238]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14002621e
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 0x1400261a8
mov rax, qword [0x14003a238]
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 0x140026810
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x14003a2a0]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14003a280]
test rbx, rbx
je 0x14002686c
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 0x140026863
test rsi, rsi
je 0x140026863
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140026848
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]