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

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x140008d78
xor eax, eax
jmp 0x140008e3b
mov rbp, rbx
cmp word [rax], si
je 0x140008d9d
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x140008d84
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x140008d80
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.140008c98
movsxd r14, eax
test eax, eax
jne 0x140008ddb
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x140008d71
mov rcx, r14
call fcn.1400097b4
mov rdi, rax
test rax, rax
jne 0x140008df4
xor ecx, ecx
call fcn.140007300
jmp 0x140008dd0
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.140008c98
test eax, eax
jne 0x140008e25
mov rcx, rdi
call fcn.140007300
jmp 0x140008e2f
xor ecx, ecx
call fcn.140007300
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret
Function at 0x140001384
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rsi, rdx
mov rdi, r8
lea rdx, [0x140040518]
call fcn.140015eb0
mov rbx, rax
test rax, rax
je 0x1400013fa
xor edx, edx
mov rcx, rax
lea r8d, [rdx + 2]
call fcn.1400157a4
mov rcx, rbx
call fcn.140011d78
mov dword [rdi], eax
lea ecx, [rax + 1]
call fcn.14000d918
xor r8d, r8d
mov qword [rsi], rax
xor edx, edx
mov rcx, rbx
call fcn.1400157a4
mov r8d, dword [rdi]
mov r9, rbx
mov rcx, qword [rsi]
mov edx, 1
call fcn.140016258
mov rcx, rbx
call fcn.140011ffc
mov al, 1
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret

Function at 0x1400014c4
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x20
movsxd rax, dword [rdx + 0x3c]
mov r15, rcx
mov rdi, rdx
lea rbx, [rax + rdx]
movzx eax, word [rax + rdx + 6]
lea r8, [rax + rax*4]
mov eax, dword [rbx + r8*8 + 0xf4]
add eax, dword [rbx + r8*8 + 0xf0]
mov ecx, eax
mov r14d, eax
call fcn.14000d918
mov r8d, r14d
xor edx, edx
mov rcx, rax
mov rsi, rax
call fcn.14000f5e0
movsxd rcx, dword [rdi + 0x3c]
mov rdx, rdi
mov r8d, dword [rcx + rdi + 0x54]
mov rcx, rsi
call fcn.14000f170
movsxd rcx, dword [rdi + 0x3c]
xor r12d, r12d
mov ebp, r12d
cmp r12w, word [rcx + rdi + 6]
jae 0x140001578
add rbx, 0x114
mov edx, dword [rbx]
mov ecx, dword [rbx + 8]
add rdx, rdi
mov r8d, dword [rbx + 4]
add rcx, rsi
call fcn.14000f170
movsxd rax, dword [rdi + 0x3c]
lea rbx, [rbx + 0x28]
inc rbp
movzx ecx, word [rax + rdi + 6]
cmp rbp, rcx
jb 0x14000154f
lea rdx, [0x140040520]
mov rcx, r15
call fcn.140015eb0
mov rbx, rax
test rax, rax
je 0x1400015aa
mov r9, rax
mov r8, r14
mov edx, 1
mov rcx, rsi
call fcn.140015d60
mov rcx, rbx
call fcn.140011ffc
mov rbx, qword [rsp + 0x40]
mov rax, rsi
mov rsi, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x58]
add rsp, 0x20
pop r15
pop r14
pop r12
ret
Function at 0x140002688
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x48
movsxd rax, dword [rcx + 0x3c]
mov rdi, rcx
xor r14b, r14b
mov byte [rsp + 0x90], r14b
mov ebp, dword [rax + rcx + 0x90]
lea rcx, str._v__anti_copy_armer_enable_n
add rbp, 0xc
call fcn.1400012dc
add rbp, rdi
mov qword [rsp + 0x28], rbp
mov eax, dword [rbp]
lea rsi, [rdi + rax]
test eax, eax
je 0x1400028b0
movabs rbx, 0x8000000080000000
mov rcx, rsi
xor r12d, r12d
call qword [sym.imp.KERNEL32.dll_SetConsoleTitleW]
mov r13d, dword [rbp + 4]
mov rdx, rax
add r13, rdi
mov qword [rsp + 0x98], rax
cmp dword [rbp - 0xc], r12d
je 0x140002710
mov r15d, dword [rbp - 0xc]
add r15, rdi
jmp 0x140002713
xor r15d, r15d
and qword [rsp + 0xa0], r12
mov rax, qword [r13]
test rax, rax
je 0x140002898
and qword [rsp + 0xa8], r12
mov rbp, qword [rsp + 0xa0]
mov qword [rsp + 0x20], r13
mov qword [rsp + 0x30], r12
test rbx, rax
jne 0x140002856
lea r8, [rdi + 2]
add r8, rax
movsxd rax, dword [rdx + 0x3c]
mov qword [rsp + 0xa0], r8
mov r14d, dword [rax + rdx + 0x88]
add r14, rdx
mov ebx, dword [r14 + 0x18]
jmp 0x14000279b
mov eax, dword [r14 + 0x20]
dec rbx
add rax, rdx
mov ecx, dword [rax + rbx*4]
add rcx, rdx
mov rdx, r8
call fcn.14001dea0
test eax, eax
je 0x1400027f3
mov rdx, qword [rsp + 0x98]
mov r8, qword [rsp + 0xa0]
test rbx, rbx
jne 0x14000276f
xor r14d, r14d
movabs rbx, 0x8000000080000000
test r14, r14
je 0x140002846
mov rax, qword [rsp + 0x20]
or r14, rbx
mov qword [rax], r14
test r15, r15
je 0x1400027d2
mov rax, qword [rsp + 0xa8]
mov qword [rax + r15], r14
mov r14b, byte [rsp + 0x90]
inc r12
cmp qword [rsp + 0x30], 0
setne al
or r14b, al
mov byte [rsp + 0x90], r14b
jmp 0x14000284e
mov ecx, dword [r14 + 0x24]
add rcx, qword [rsp + 0x98]
movzx eax, word [rcx + rbx*2]
add eax, dword [r14 + 0x10]
mov rcx, qword [rsp + 0x98]
mov edx, eax
mov r14d, eax
call qword [sym.imp.KERNEL32.dll_InitOnceInitialize]
mov rdx, qword [rsp + 0xa0]
mov rbx, rax
mov rcx, qword [rsp + 0x98]
call qword [sym.imp.KERNEL32.dll_InitOnceInitialize]
cmp rax, rbx
je 0x1400027a3
movabs rbx, 0x8000000080000000
mov r14b, byte [rsp + 0x90]
mov rdx, qword [rsp + 0x98]
inc rbp
mov rcx, rbp
shl rcx, 3
mov qword [rsp + 0xa8], rcx
add rcx, r13
mov qword [rsp + 0x20], rcx
mov rax, qword [rcx]
test rax, rax
jne 0x14000273d
mov rbp, qword [rsp + 0x28]
test r12, r12
je 0x140002898
mov r8, rsi
lea rcx, str._t__patched__i_APIs_for__s_n
mov rdx, r12
call fcn.1400012dc
add rbp, 0x14
mov qword [rsp + 0x28], rbp
mov ecx, dword [rbp]
lea rsi, [rdi + rcx]
test ecx, ecx
jne 0x1400026e3
mov al, r14b
add rsp, 0x48
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x1400035e4
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0xc0
xor ebx, ebx
mov rdi, rcx
cmp word [rcx + 0x22], bx
jne 0x140003617
mov rax, qword gs:[0x60]
mov rcx, qword [rax + 0x20]
mov rcx, qword [rcx + 0x68]
call fcn.1400029f8
mov qword [rsp + 0x38], rbx
lea rcx, str..pipemy_pipe
mov r9d, 1
mov dword [rsp + 0x30], ebx
mov dword [rsp + 0x28], ebx
xor r8d, r8d
mov dword [rsp + 0x20], ebx
lea edx, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_EnumCalendarInfoExW]
mov rcx, qword gs:[0x60]
lea rdx, str.slave
mov rsi, rax
mov rcx, qword [rcx + 0x20]
mov rcx, qword [rcx + 0x78]
call qword [sym.imp.SHLWAPI.dll_StrToIntExW]
test rax, rax
je 0x1400036f7
mov qword [rsp + 0x30], rbx
lea rcx, str..pipemy_pipe
mov r8d, 3
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
mov dword [rsp + 0x20], r8d
mov edx, 0x80000000
call qword [sym.imp.KERNEL32.dll_DisassociateCurrentThreadFromCallback]
xor r9d, r9d
mov qword [rsp + 0x20], rbx
mov rcx, rax
lea rdx, [rsp + 0x40]
mov r8d, 0x80
call qword [sym.imp.KERNEL32.dll_WerSetFlags]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetVolumeNameForVolumeMountPointW]
mov rdx, rax
mov eax, dword [rdi + 0xc]
add rdx, rax
mov eax, dword [rdi + 8]
test rax, 0xfffffffffffffffc
jbe 0x1400036e6
mov eax, dword [rdi + 0x1c]
xor dword [rdx + rbx*4], eax
inc rbx
mov eax, dword [rdi + 8]
shr rax, 2
cmp rbx, rax
jb 0x1400036d1
mov eax, dword [rsp + 0x40]
mov dword [rdx], eax
mov r8d, dword [rdi + 8]
call fcn.1400031b8
jmp 0x140003749
mov rax, qword gs:[0x60]
lea r9, str.slave
mov dword [rsp + 0x28], ebx
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rbx
mov r8, qword [rax + 0x20]
mov r8, qword [r8 + 0x68]
call qword [sym.imp.SHELL32.dll_ShellExec_RunDLL]
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateSocketHandle]
xor r9d, r9d
mov qword [rsp + 0x20], rbx
lea rdx, [0x140040a18]
mov rcx, rsi
lea r8d, [r9 + 4]
call qword [sym.imp.KERNEL32.dll_Ordinal_1576]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateJobSet]
lea r11, [rsp + 0xc0]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rsp, r11
pop rdi
ret
Function at 0x14001be00
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x14001bc2c

Function at 0x14002424c
Capabilities:
Read file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x20
mov rbx, rcx
test rcx, rcx
jne 0x140023f72
call fcn.14001668c
mov dword [rax], 0x16
call fcn.140016534
jmp 0x1400240bd
mov eax, dword [rcx + 0x14]
shr eax, 0xd
test al, 1
je 0x1400240bd
mov eax, dword [rcx + 0x14]
shr eax, 0xc
test al, 1
jne 0x1400240bd
mov eax, dword [rcx + 0x14]
shr eax, 1
test al, 1
je 0x140023fa1
lock or dword [rcx + 0x14], 0x10
jmp 0x1400240bd
lock or dword [rcx + 0x14], 1
mov eax, dword [rcx + 0x14]
test eax, 0x4c0
jne 0x140023fb5
call fcn.140024374
mov esi, dword [rbx + 0x10]
cmp esi, 1
jne 0x140023fc5
mov rax, qword [rbx]
mov bpl, byte [rax]
jmp 0x140023fc8
xor bpl, bpl
mov rdi, qword [rbx + 8]
mov rcx, rbx
mov qword [rbx], rdi
call fcn.14001ec0c
mov r8d, dword [rbx + 0x20]
mov ecx, eax
mov rdx, rdi
call fcn.14001f20c
mov dword [rbx + 0x10], eax
lea ecx, [rax + 1]
cmp ecx, 2
jbe 0x1400240ab
mov eax, dword [rbx + 0x14]
test al, 6
jne 0x140024059
mov rcx, rbx
call fcn.14001ec0c
cmp eax, 0xffffffff
je 0x140024044
mov rcx, rbx
call fcn.14001ec0c
cmp eax, 0xfffffffe
je 0x140024044
mov rcx, rbx
call fcn.14001ec0c
movsxd rdi, eax
lea r14, [0x1400498b0]
mov rcx, rbx
sar rdi, 6
call fcn.14001ec0c
and eax, 0x3f
lea rcx, [rax + rax*8]
mov rax, qword [r14 + rdi*8]
lea rdx, [rax + rcx*8]
jmp 0x14002404b
lea rdx, [0x1400473c0]
mov al, byte [rdx + 0x38]
and al, 0x82
cmp al, 0x82
jne 0x140024059
lock or dword [rbx + 0x14], 0x20
cmp dword [rbx + 0x20], 0x200
jne 0x14002407d
mov eax, dword [rbx + 0x14]
shr eax, 6
test al, 1
je 0x14002407d
mov eax, dword [rbx + 0x14]
shr eax, 8
test al, 1
jne 0x14002407d
mov dword [rbx + 0x20], 0x1000
mov rax, qword [rbx]
cmp esi, 1
jne 0x14002409b
movzx ecx, byte [rax]
dec dword [rbx + 0x10]
shl cx, 8
movzx eax, bpl
or cx, ax
inc qword [rbx]
jmp 0x1400240a6
movzx ecx, word [rax]
add dword [rbx + 0x10], 0xfffffffe
add qword [rbx], 2
movzx eax, cx
jmp 0x1400240c2
neg eax
sbb eax, eax
and eax, 8
add eax, 8
lock or dword [rbx + 0x14], eax
and dword [rbx + 0x10], 0
mov eax, 0xffff
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret
jmp 0x140023f3c
Function at 0x401c7e
Capabilities:
Write file on windows

Disassembly:
push rdi
push rbx
sub rsp, 0x28
xor r8d, r8d
test rdx, rdx
mov rbx, rcx
mov r10, rdx
je 0x401ca7
mov rdi, rdx
or rcx, 0xffffffffffffffff
xor eax, eax
repne scasb al, byte [rdi]
mov rdx, rcx
not rdx
lea r8, [rdx - 1]
mov rcx, r10
mov r9, rbx
mov edx, 1
call sub.msvcrt.dll_fwrite
mov rcx, rbx
add rsp, 0x28
pop rbx
pop rdi
jmp 0x407300
jmp qword [sym.imp.msvcrt.dll_fflush]

Function at 0x406080
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x00413644]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x406208
mov rax, qword [0x00413648]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x4060cc
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x406155
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x4060b0
mov rcx, rbx
call fcn.00406d20
test rax, rax
mov r12, rax
je 0x40623d
mov rax, qword [0x00413648]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call fcn.00406e50
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x00413648]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x406220
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x40614e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x4061b0
add dword [0x00413644], 1
cmp edi, 8
jae 0x406183
test dil, 4
jne 0x4061f4
test edi, edi
je 0x406178
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x40620f
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 0x406178
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 0x40619c
jmp 0x406178
add rsi, qword [0x00413648]
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 0x40614e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.0040c070
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x406178
xor esi, esi
jmp 0x4060d7
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x406178
mov rax, qword [0x00413648]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call fcn.0040c070
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.0040c070
nop
nop dword [rax]
Function at 0x406990
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x00413920]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x00413900]
test rbx, rbx
je 0x4069e4
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 0x4069db
test rsi, rsi
je 0x4069db
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x4069c0
lea rcx, [0x00413920]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x406d20
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x0040f840]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x406d8d
mov rcx, r8
call fcn.00406c00
test eax, eax
je 0x406d8d
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 0x406d8d
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 0x406d84
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x406d8f
add rax, 0x28
cmp rax, r9
jne 0x406d70
xor eax, eax
add rsp, 0x28
ret

Function at 0x407ac0
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x0040d3d8], eax
je 0x407ada
add rsp, 0x28
ret
call sub.msvcrt.dll_abort
nop

Function at 0x407fe0
Capabilities:
Print debug messages

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x90
test rcx, rcx
mov rbx, rcx
je 0x408003
call fcn.0040ad20
cmp eax, 1
je 0x40800e
mov qword [rbx], 0xffffffffffffffff
add rsp, 0x90
pop rbx
pop rsi
pop rdi
ret
lea rdi, [rsp + 0x20]
xor eax, eax
mov ecx, 0xa
lea rsi, str.Error_cleaning_up_spin_keys_for_thread
rep movsd dword [rdi], dword [rsi]
lea rdi, [rsp + 0x48]
mov ecx, 0x43
rep stosb byte [rdi], al
lea rbx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, [rbx + 0x27]
mov r8d, 0xa
mov ecx, eax
call qword [sym.imp.msvcrt.dll__ultoa]
cmp byte [rsp + 0x47], 0
je 0x408085
mov eax, 0x28
jmp 0x40806a
add rax, 1
cmp rax, 0x6b
je 0x408077
cmp byte [rbx + rax], 0
mov edx, eax
jne 0x408060
cmp eax, 0x6a
jne 0x40808a
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sub.msvcrt.dll_abort
mov edx, 0x27
movsxd rax, edx
mov byte [rsp + rax + 0x20], 0xa
lea eax, [rdx + 1]
cdqe
mov byte [rsp + rax + 0x20], 0
jmp 0x408077
Function at 0x408130
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
cmp dword [0x00413a00], 1
je 0x408146
call fcn.004080a0
mov ecx, dword [0x0040d3d8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x408170
mov rax, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
call fcn.00407f20
cmp qword [0x00415050], 0
mov rsi, rax
je 0x40815a
test rax, rax
je 0x40815a
mov dword [rax + 0x44], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor r9d, r9d
xor r8d, r8d
mov edx, 1
xor ecx, ecx
mov dword [rsi + 0x70], eax
call qword [sym.imp.KERNEL32.dll_CreateEventA]
lea rcx, [rsi + 0x68]
mov qword [rsi + 0x38], 0xffffffffffffffff
mov qword [rsi + 0x30], rax
call fcn.00407fe0
mov rbx, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [rsi + 0xb8], 0
mov qword [rsi + 0x28], 0
call rbx
mov rbp, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rdi, rax
call rbx
mov dword [rsp + 0x30], 2
mov r8, rbp
mov rdx, rdi
mov dword [rsp + 0x28], 0
lea r9, [rsi + 0x28]
mov rcx, rax
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x408260
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov rdx, rsi
mov ecx, dword [0x0040d3d8]
mov dword [rsi + 0xbc], 0
mov dword [rsi + 0xc0], eax
movzx eax, byte [rsi + 0x40]
and eax, 0xffffffcf
or eax, 0x10
mov byte [rsi + 0x40], al
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x408260
mov rbx, rsi
mov rax, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
call sub.msvcrt.dll_abort
nop
nop word cs:[rax + rax]

Function at 0x40c070
Capabilities:
Write file on windows

Disassembly:
lea rcx, [0x00401540]
jmp 0x401510
push rsi
push rbx
sub rsp, 0x38
lea rax, [rsp + 0x58]
mov rbx, rcx
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call fcn.00407380
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call fcn.00407380
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop
nop
nop
nop
nop
nop
nop
jmp 0x401530
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x14001c470]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x14001c480]
mov dword [rax], 1
mov rax, qword [0x14001c490]
mov dword [rax], 1
mov rax, qword [0x14001c460]
mov dword [rax], 1
mov rax, qword [0x14001c300]
cmp word [rax], 0x5a4d
jne 0x140001067
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010d0
mov rax, qword [0x14001c450]
mov dword [0x14001f020], ecx
mov eax, dword [rax]
test eax, eax
je 0x1400010c0
mov ecx, 2
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x14001c410]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x14001c3f0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x14001c290]
cmp dword [rax], 1
je 0x140001108
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x140001084
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001120
cmp dx, 0x20b
jne 0x140001067
cmp dword [rax + 0x84], 0xe
jbe 0x140001067
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x140001067
lea rcx, [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x140001067
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x140001067

Function at 0x140001d00
Capabilities:
Write file on windows

Disassembly:
push r12
push rbx
sub rsp, 0x38
mov r12, 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 rbx, qword [rsp + 0x28]
mov ecx, 2
call dbg.__acrt_iob_func
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sym.vfprintf
call sym.abort
nop
nop word [rax + rax]
Function at 0x140001d70
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x50
movsxd rbx, dword [0x14001f0b4]
mov r12, rcx
test ebx, ebx
jle 0x140001ea0
mov rax, qword [0x14001f0b8]
xor ecx, ecx
add rax, 0x18
nop word [rax + rax]
mov rdx, qword [rax]
cmp rdx, r12
ja 0x140001dbc
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x140001e43
add ecx, 1
add rax, 0x28
cmp ecx, ebx
jne 0x140001da0
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rsi, rax
test rax, rax
je 0x140001ec2
mov rax, qword [0x14001f0b8]
lea rbx, [rbx + rbx*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rsi
mov dword [rax], 0
call dbg._GetPEImageBase
mov ecx, dword [rsi + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x14001f0b8]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140001ea7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140001e3c
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140001e50
add dword [0x14001f0b4], 1
add rsp, 0x50
pop rbx
pop rsi
pop r12
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 4
mov eax, 0x40
cmovne r8d, eax
add rbx, qword [0x14001f0b8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140001e3c
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 ebx, ebx
jmp 0x140001dc7
mov rax, qword [0x14001f0b8]
mov edx, dword [rsi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call dbg.__report_error
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140002380
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x14001f120]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14001f100]
test rbx, rbx
je 0x1400023d4
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
test eax, eax
jne 0x1400023cb
test r12, r12
je 0x1400023cb
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x1400023b0
lea rcx, [0x14001f120]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x1400025f0
Capabilities:
Parse pe header

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