joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14011fe80
Capabilities:
Resolve dns

Disassembly:
push rdi
push r12
push r13
push r15
sub rsp, 0x28
mov r13, r9
xor edi, edi
mov qword [r9], rdi
xor r15d, r15d
lea r9, [rsp + 0x68]
call qword [sym.imp.WS2_32.dll_getaddrinfo]
mov r12d, eax
test eax, eax
jne 0x14012001e
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x60], rsi
mov rsi, qword [rsp + 0x68]
test rsi, rsi
je 0x14011fffe
mov qword [rsp + 0x58], rbp
mov qword [rsp + 0x20], r14
nop
mov rax, qword [rsi + 0x18]
test rax, rax
je 0x14011feee
mov rbx, 0xffffffffffffffff
inc rbx
cmp byte [rax + rbx], 0
jne 0x14011fee0
inc rbx
jmp 0x14011fef0
xor ebx, ebx
mov eax, dword [rsi + 4]
cmp eax, 2
jne 0x14011fefd
lea ebp, [rax + 0xe]
jmp 0x14011ff09
cmp eax, 0x17
jne 0x14011ffa1
lea ebp, [rax + 5]
cmp qword [rsi + 0x20], 0
je 0x14011ffa1
mov rax, qword [rsi + 0x10]
test rax, rax
je 0x14011ffa1
cmp rax, rbp
jb 0x14011ffa1
lea rcx, [rbp + 0x30]
add rcx, rbx
call qword [0x143a7a130]
mov r14, rax
test rax, rax
je 0x14011ffb0
mov ecx, dword [rsi]
mov r8, rbp
mov dword [rax], ecx
mov ecx, dword [rsi + 4]
mov dword [rax + 4], ecx
mov ecx, dword [rsi + 8]
mov dword [rax + 8], ecx
mov ecx, dword [rsi + 0xc]
mov dword [rax + 0xc], ecx
lea rcx, [r14 + 0x30]
mov dword [rax + 0x10], ebp
xor eax, eax
mov qword [r14 + 0x18], rax
mov qword [r14 + 0x28], rax
mov qword [r14 + 0x20], rcx
mov rdx, qword [rsi + 0x20]
call sub.VCRUNTIME140.dll_memcpy
test rbx, rbx
je 0x14011ff8e
mov rcx, qword [r14 + 0x20]
mov r8, rbx
add rcx, rbp
mov qword [r14 + 0x18], rcx
mov rdx, qword [rsi + 0x18]
call sub.VCRUNTIME140.dll_memcpy
test rdi, rdi
cmove rdi, r14
test r15, r15
je 0x14011ff9e
mov qword [r15 + 0x28], r14
mov r15, r14
mov rsi, qword [rsi + 0x28]
test rsi, rsi
jne 0x14011fed0
jmp 0x14011ffb6
mov r12d, 8
mov rcx, qword [rsp + 0x68]
mov r14, qword [rsp + 0x20]
mov rbp, qword [rsp + 0x58]
test rcx, rcx
je 0x14011ffd0
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
test r12d, r12d
je 0x14011fff9
test rdi, rdi
je 0x14011fff5
nop word [rax + rax]
mov rbx, qword [rdi + 0x28]
mov rcx, rdi
call qword [0x143a7a138]
mov rdi, rbx
test rbx, rbx
jne 0x14011ffe0
xor edi, edi
jmp 0x14012000d
test rdi, rdi
jne 0x14012000d
mov r12d, 0x2af9
mov ecx, r12d
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov rsi, qword [rsp + 0x60]
mov eax, r12d
mov rbx, qword [rsp + 0x50]
mov qword [r13], rdi
add rsp, 0x28
pop r15
pop r13
pop r12
pop rdi
ret

Function at 0x140120480
Capabilities:
Create thread

Disassembly:
push rbx
sub rsp, 0x30
xor ebx, ebx
mov r9, rdx
mov r8, rcx
mov qword [rsp + 0x28], rbx
xor edx, edx
mov dword [rsp + 0x20], ebx
xor ecx, ecx
call sub.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex
test rax, rax
je 0x1401204b6
cmp rax, 0xffffffffffffffff
cmovne rbx, rax
mov rax, rbx
add rsp, 0x30
pop rbx
ret
add rsp, 0x30
pop rbx
ret
Function at 0x1401262c0
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x20
mov r14, rcx
mov ebx, 1
mov edx, ebx
xor ecx, ecx
xor ebp, ebp
call qword [0x143a7a140]
mov rdi, rax
test rax, rax
je 0x14012633d
nop word [rax + rax]
mov r8d, ebx
mov rdx, rdi
mov rcx, r14
mov rbp, rdi
mov esi, ebx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov ebx, eax
test eax, eax
je 0x140126368
cmp ebx, esi
je 0x140126368
cmp ebx, 0x8000
ja 0x140126368
cmp ebx, esi
jb 0x140126363
mov edx, ebx
mov rcx, rdi
call qword [0x143a7a140]
mov rdi, rax
test rax, rax
jne 0x140126300
mov rcx, rbp
call qword [0x143a7a138]
xor eax, eax
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
mov rax, rdi
jmp 0x140126348
mov rcx, rdi
jmp 0x140126340

Function at 0x14013bad0
Capabilities:
Convert ip address from string

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r13
push r14
push r15
sub rsp, 0x70
mov rax, qword [0x143a7afc0]
xor rax, rsp
mov qword [rsp + 0x60], rax
mov rdi, r8
mov rsi, rdx
mov r13, rcx
cmp r8, 4
jb 0x14013bc5e
inc rsi
lea rdx, str.0123456789abcdefABCDEF:.
mov rcx, rsi
sub rdi, 2
call sub.api_ms_win_crt_string_l1_1_0.dll_strspn
cmp rdi, rax
je 0x14013bbd4
cmp byte [rsi + rax], 0x25
lea r14, [rsi + rax]
mov rdi, rax
jne 0x14013bc5e
xor ebp, ebp
lea rdx, [0x1401fe5c8]
lea rcx, [r14 + 1]
lea rbx, [r14 + 1]
lea r8d, [rbp + 2]
call sub.api_ms_win_crt_string_l1_1_0.dll_strncmp
test eax, eax
jne 0x14013bb62
movzx eax, byte [r14 + 3]
lea rcx, [r14 + 3]
test al, al
je 0x14013bb62
cmp al, 0x5d
cmovne rbx, rcx
movzx eax, byte [rbx]
test al, al
je 0x14013bc5e
mov rcx, rbp
cmp al, 0x5d
je 0x14013bb8d
cmp rcx, 0xf
jge 0x14013bb8d
inc rbx
mov byte [rsp + rcx + 0x20], al
inc ebp
inc rcx
movzx eax, byte [rbx]
test al, al
jne 0x14013bb70
test ebp, ebp
je 0x14013bc5e
cmp byte [rbx], 0x5d
jne 0x14013bc5e
movsxd rax, ebp
cmp rax, 0x10
jae 0x14013bc7f
lea rcx, [rsp + 0x20]
mov byte [rsp + rax + 0x20], 0
call qword [0x143a7a148]
mov qword [r13 + 0x28], rax
test rax, rax
jne 0x14013bbce
mov eax, 7
jmp 0x14013bc63
mov word [r14], 0x5d
lea r8, [rsp + 0x20]
mov byte [rdi + rsi], 0
mov rdx, rsi
mov ecx, reloc.WS2_32.dll_socket
call qword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jne 0x14013bc5e
lea r9d, [rax + 0x2d]
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x20]
lea ecx, [rax + 0x16]
call sub.WS2_32.dll_inet_ntop
test rax, rax
je 0x14013bc56
lea rax, [rsp + 0x30]
mov rdx, 0xffffffffffffffff
inc rdx
cmp byte [rax + rdx], 0
jne 0x14013bc17
cmp rdx, rdi
jae 0x14013bc56
lea rax, [rsp + 0x30]
mov r8, rsi
sub r8, rax
lea rcx, [rsp + 0x30]
nop word [rax + rax]
movzx eax, byte [rcx]
mov byte [r8 + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x14013bc40
mov rdi, rdx
mov byte [rdx + rsi + 1], al
mov byte [rdi + rsi], 0x5d
xor eax, eax
jmp 0x14013bc63
mov eax, reloc.WS2_32.dll_shutdown
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.14016e230
add rsp, 0x70
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbp
pop rbx
ret
call fcn.14016e58c
int3
Function at 0x14016e908
Capabilities:
Parse pe header

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

Disassembly:
cld
and rsp, 0xfffffffffffffff0
call fcn.1400040d6
push r9
push r8
push rdx
xor rdx, rdx
push rcx
push rsi
mov rdx, qword gs:[rdx + 0x60]
mov rdx, qword [rdx + 0x18]
mov rdx, qword [rdx + 0x20]
mov rsi, qword [rdx + 0x50]
xor r9, r9
movzx rcx, word [rdx + 0x4a]
xor rax, rax
lodsb al, byte [rsi]
cmp al, 0x61
jl 0x140004037
sub al, 0x20
ror r9d, 0xd
add r9d, eax
loop 0x14000402d
push rdx
mov rdx, qword [rdx + 0x20]
mov eax, dword [rdx + 0x3c]
add rax, rdx
push r9
cmp word [rax + 0x18], 0x20b
jne 0x1400040cb
mov eax, dword [rax + 0x88]
test rax, rax
je 0x1400040cb
add rax, rdx
mov r8d, dword [rax + 0x20]
push rax
mov ecx, dword [rax + 0x18]
add r8, rdx
jrcxz 0x1400040ca
xor r9, r9
dec rcx
mov esi, dword [r8 + rcx*4]
add rsi, rdx
xor rax, rax
ror r9d, 0xd
lodsb al, byte [rsi]
add r9d, eax
cmp al, ah
jne 0x140004081
add r9, qword [rsp + 8]
cmp r9d, r10d
jne 0x140004072
pop rax
mov r8d, dword [rax + 0x24]
add r8, rdx
mov cx, word [r8 + rcx*2]
mov r8d, dword [rax + 0x1c]
add r8, rdx
mov eax, dword [r8 + rcx*4]
add rax, rdx
pop r8
pop r8
pop rsi
pop rcx
pop rdx
pop r8
pop r9
pop r10
sub rsp, 0x20
push r10
jmp rax
pop rax
pop r9
pop rdx
mov rdx, qword [rdx]
jmp 0x140004021
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor eax, eax
cmp word [0x00400000], 0x5a4d
mov dword [0x0049c058], 1
mov dword [0x0049c054], 1
mov dword [0x0049c050], 1
mov dword [0x0049c060], 1
je 0x4010b0
mov dword [0x0049c008], eax
mov eax, dword [0x0049c070]
test eax, eax
je 0x4010a1
mov ecx, 2
call sym.__set_app_type
mov rcx, 0xffffffffffffffff
call dbg._encode_pointer
mov edx, dword [0x0049c080]
mov qword [0x0049d528], rax
mov qword [0x0049d520], rax
mov rax, qword [sym.imp.msvcrt.dll__fmode]
mov dword [rax], edx
call dbg._setargv
cmp dword [0x0046a060], 1
je 0x401100
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x401063
movsxd rcx, dword [0x0040003c]
lea rdx, [0x00400000]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x401049
movzx ecx, word [rdx + 0x18]
cmp cx, 0x10b
je 0x401113
cmp cx, 0x20b
jne 0x401049
cmp dword [rdx + 0x84], 0xe
jbe 0x401049
mov edx, dword [rdx + 0xf8]
xor eax, eax
test edx, edx
setne al
jmp 0x401049
lea rcx, [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rdx + 0x74], 0xe
jbe 0x401049
mov ecx, dword [rdx + 0xe8]
xor eax, eax
test ecx, ecx
setne al
jmp 0x401049
Function at 0x40a100
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x60
mov rsi, rcx
mov ecx, dword [0x0049c374]
mov rdi, rdx
mov rbp, r8
test ecx, ecx
jle 0x40a2e5
mov rax, qword [0x0049c378]
xor ebx, ebx
nop
mov r9, qword [rax + 8]
cmp rsi, r9
jb 0x40a14c
mov rdx, qword [rax + 0x10]
mov edx, dword [rdx + 8]
add r9, rdx
cmp rsi, r9
jb 0x40a220
add ebx, 1
add rax, 0x18
cmp ebx, ecx
jne 0x40a130
mov rcx, rsi
call dbg.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x40a309
movsxd rbx, ebx
lea r13, [rsp + 0x30]
lea r14, [rbx + rbx*2]
shl r14, 3
mov rbx, r14
add rbx, qword [0x0049c378]
mov qword [rbx + 0x10], rax
mov dword [rbx], 0
call dbg._GetPEImageBase
mov edx, dword [r12 + 0xc]
mov r8d, 0x30
add rax, rdx
mov rdx, r13
mov qword [rbx + 8], rax
mov rax, qword [0x0049c378]
mov rbx, qword [sym.imp.KERNEL32.dll_VirtualQuery]
mov rcx, qword [rax + r14 + 8]
call rbx
test rax, rax
je 0x40a2ec
mov eax, dword [rsp + 0x54]
cmp eax, 4
jne 0x40a2a0
add dword [0x0049c374], 1
mov r8d, 0x30
mov rdx, r13
mov rcx, rsi
call rbx
test rax, rax
je 0x40a318
mov eax, dword [rsp + 0x54]
cmp eax, 4
jne 0x40a230
mov r8, rbp
mov rdx, rdi
mov rcx, rsi
add rsp, 0x60
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
jmp sym.memcpy
lea r13, [rsp + 0x30]
mov rbx, qword [sym.imp.KERNEL32.dll_VirtualQuery]
jmp 0x40a1db
cmp eax, 0x40
je 0x40a1fb
lea r12, [rsp + 0x2c]
mov r8d, 0x40
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x30]
mov rbx, qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov r9, r12
call rbx
mov r8, rbp
mov rdx, rdi
mov rcx, rsi
call sym.memcpy
mov eax, dword [rsp + 0x54]
cmp eax, 0x40
je 0x40a287
cmp eax, 4
je 0x40a287
mov r9, r12
mov r8d, dword [rsp + 0x2c]
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x30]
call rbx
nop
add rsp, 0x60
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
cmp eax, 0x40
je 0x40a1d4
add r14, qword [0x0049c378]
mov r8d, 0x40
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x30]
mov r9, r14
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x40a1d4
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
xor ebx, ebx
jmp 0x40a157
mov rax, qword [0x0049c378]
mov edx, dword [r12 + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + r14 + 8]
call dbg.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rsi
call dbg.__report_error
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, rsi
mov edx, 0x30
call dbg.__report_error
nop
nop dword [rax]
Function at 0x40a8f0
Capabilities:
Get thread local storage value

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

Function at 0x40ab40
Capabilities:
Parse pe header

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

Function at 0x40ab60
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 0x40aba0
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
mov ecx, dword [rax + 0xc]
mov r8d, ecx
cmp r8, rdx
ja 0x40ab97
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x40aba2
add rax, 0x28
cmp rax, r9
jne 0x40ab84
xor eax, eax
repz ret

Function at 0x40ac60
Capabilities:
Enumerate pe sections

Disassembly:
push rsi
push rbx
sub rsp, 0x28
cmp word [0x00400000], 0x5a4d
lea rbx, [0x00400000]
mov rsi, rcx
je 0x40ac84
xor eax, eax
add rsp, 0x28
pop rbx
pop rsi
ret
mov rcx, rbx
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40ac7b
sub rsi, rbx
mov rcx, rbx
mov rdx, rsi
add rsp, 0x28
pop rbx
pop rsi
jmp dbg._FindPESection
Function at 0x40b580
Capabilities:
Check mutex on windows

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x80]
mov r14, rcx
movsxd r12, edx
mov r13, r8
call sym.strlen
mov rsi, rax
lea ebx, [rax + 0xf]
lea eax, [rax + 0x52]
cdqe
add rax, 0xf
and rax, 0xfffffffffffffff0
call fcn.0040aef0
sub rsp, rax
movsxd rdi, esi
movabs rax, 0x656d68732d636367
lea r15, [rsp + 0x20]
lea rcx, [rsp + 0x2f]
mov r8, rdi
mov rdx, r14
mov qword [rsp + 0x20], rax
mov eax, 0x326d
mov dword [rsp + 0x28], 0x64742d6d
mov word [rsp + 0x2c], ax
lea r14d, [rsi + 0x50]
mov byte [rsp + 0x2e], 0x2d
movsxd rbx, ebx
call sym.memcpy
lea rax, [r15 + rdi + 0x10]
movabs rdx, 0x6161616161616161
xor ecx, ecx
mov r8, r15
mov qword [rax], rdx
mov qword [rax + 8], rdx
mov qword [rax + 0x10], rdx
mov qword [rax + 0x18], rdx
mov qword [rax + 0x20], rdx
mov qword [rax + 0x28], rdx
mov qword [rax + 0x30], rdx
mov qword [rax + 0x38], rdx
movsxd rax, r14d
xor edx, edx
mov byte [rsp + rax + 0x20], 0
mov byte [rsp + rbx + 0x20], 0
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov byte [rsp + rbx + 0x20], 0x2d
mov rdi, rax
mov edx, 0xffffffff
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x40b669
int3
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_FindAtomA]
test ax, ax
jne 0x40b708
mov rcx, r12
call sym.malloc
lea r9d, [rsi + 0x10]
mov rbx, rax
mov r10d, 0x40
bt rbx, r10
jae 0x40b6a4
mov r11d, r14d
sub r11d, r10d
movsxd r11, r11d
mov byte [r15 + r11], 0x41
sub r10d, 1
jne 0x40b690
mov dword [rbp - 0x54], r9d
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_AddAtomA]
test ax, ax
mov r9d, dword [rbp - 0x54]
je 0x40b705
lea r8d, [rsi + 0x51]
movzx ecx, ax
mov rdx, r15
call dbg.get_ptr_from_atom
cmp rax, rbx
mov rsi, rax
je 0x40b720
mov rcx, rbx
call sym.free
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, rsi
lea rsp, [rbp - 0x48]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
int3
lea r9d, [rsi + 0x10]
lea r8d, [rsi + 0x51]
movzx ecx, ax
mov rdx, r15
call dbg.get_ptr_from_atom
mov rsi, rax
jmp 0x40b6df
xor edx, edx
mov r8, r12
mov rcx, rbx
call sym.memset
test r13, r13
je 0x40b6df
mov rcx, rbx
call r13
jmp 0x40b6df
Function at 0x415d00
Capabilities:
Resume thread
Suspend thread

Disassembly:
push rsi
push rbx
sub rsp, 0x4f8
mov rsi, 0xffffffffffffffff
mov rbx, rcx
call qword [sym.imp.KERNEL32.dll_SuspendThread]
cmp eax, 0xffffffff
je 0x415d48
mov rcx, rbx
mov dword [rsp + 0x50], 0x100003
lea rdx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
mov rcx, rbx
test eax, eax
cmovne rsi, qword [rsp + 0x118]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rax, rsi
add rsp, 0x4f8
pop rbx
pop rsi
ret
Function at 0x415dd0
Capabilities:
Create thread

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
mov esi, dword [rsp + 0xb0]
mov rbx, rcx
mov r13, rdx
mov r12, r8
mov rbp, r9
cmp esi, 0x10000
ja 0x415fd0
mov rdx, qword [rcx + 8]
test rdx, rdx
je 0x415e2a
mov rcx, qword [rcx + 0x10]
xor r9d, r9d
mov r8d, 0xffffffff
call qword [sym.imp.KERNEL32.dll_SignalObjectAndWait]
mov rcx, qword [rbx + 0x10]
mov rdi, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rdi
mov rcx, qword [rbx + 8]
call rdi
mov rcx, qword [rbx]
test rcx, rcx
je 0x415e38
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
test esi, esi
jne 0x415e50
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
xor edx, edx
mov r8, r12
mov rcx, r13
call sym.memset
test bl, 1
mov rdi, rbx
mov edx, 0x38
jne 0x416002
test dil, 2
jne 0x416010
test dil, 4
jne 0x415ff0
mov ecx, edx
xor eax, eax
shr ecx, 3
test dl, 4
rep stosq qword [rdi], rax
jne 0x415fb5
test dl, 2
jne 0x415fa0
and edx, 1
jne 0x415f91
mov rax, r12
mov ecx, esi
xor edx, edx
shr rax, 1
mov qword [0x0049d3e0], rbp
mov dword [0x0049d3f0], esi
shl rax, 0x10
mov rsi, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov qword [0x0049d3d8], r13
div rcx
lea rax, [rbp + rax*2]
mov qword [0x0049d3e8], rax
call rsi
mov rbp, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rdi, rax
call rsi
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], 0
mov r9, rbx
mov dword [rsp + 0x20], 0
mov r8, rbp
mov rdx, rdi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x416022
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
mov edx, 1
call qword [sym.imp.KERNEL32.dll_CreateEventA]
test rax, rax
mov qword [rbx + 0x10], rax
je 0x416038
lea rax, [rsp + 0x4c]
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x20], 0
mov r9, rbx
lea r8, [dbg.profthr_func]
mov qword [rsp + 0x28], rax
call qword [sym.imp.KERNEL32.dll_CreateThread]
test rax, rax
mov qword [rbx + 8], rax
je 0x41605d
mov edx, 0xf
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
xor eax, eax
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov byte [rdi], 0
jmp 0x415ea7
xor eax, eax
add rdi, 2
mov word [rdi - 2], ax
and edx, 1
je 0x415ea7
jmp 0x415f91
mov dword [rdi], 0
add rdi, 4
test dl, 2
je 0x415e9e
jmp 0x415fa0
call qword [sym.imp.msvcrt.dll__errno]
mov dword [rax], 0x16
mov eax, 0xffffffff
jmp 0x415e3e
mov dword [rdi], 0
sub edx, 4
add rdi, 4
jmp 0x415e82
mov byte [rbx], 0
lea rdi, [rbx + 1]
mov dl, 0x37
jmp 0x415e6e
xor ecx, ecx
add rdi, 2
sub edx, 2
mov word [rdi - 2], cx
jmp 0x415e78
call qword [sym.imp.msvcrt.dll__errno]
mov dword [rax], 3
mov eax, 0xffffffff
jmp 0x415e3e
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx], 0
call qword [sym.imp.msvcrt.dll__errno]
mov dword [rax], 0xb
mov eax, 0xffffffff
jmp 0x415e3e
mov rcx, qword [rbx]
mov rsi, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rsi
mov rcx, qword [rbx + 0x10]
call rsi
mov qword [rbx], 0
call qword [sym.imp.msvcrt.dll__errno]
mov dword [rax], 0xb
mov eax, 0xffffffff
jmp 0x415e3e
Function at 0x416f90
Capabilities:
Allocate thread local storage

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, qword [0x0049d468]
test rbx, rbx
je 0x416fc0
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [rbx], eax
mov rax, qword [0x0049d468]
test rax, rax
je 0x416fe4
cmp dword [rax], 0xffffffff
je 0x417005
add rsp, 0x20
pop rbx
ret
lea r8, [sym.__shmem_winpthreads_init__pthread_tls_shmem]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call sym.__shmem_winpthreads_grab
mov qword [0x0049d468], rax
mov rbx, rax
jmp 0x416fa1
lea r8, [sym.__shmem_winpthreads_init__pthread_tls_shmem]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call sym.__shmem_winpthreads_grab
mov qword [0x0049d468], rax
jmp 0x416fb5
call sym.abort
nop
nop dword [rax + rax]

Function at 0x4175f0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov rcx, qword [0x0049d470]
test rcx, rcx
je 0x417742
cmp dword [rcx], 1
je 0x417612
call sym._pthread_once_raw.part.1.constprop.4
mov rax, qword [0x0049d468]
test rax, rax
je 0x417765
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x417640
mov rax, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
call sym.pop_pthread_mem
cmp qword [sym.__dyn_tls_pthread], 0
mov rsi, rax
je 0x417632
test rax, rax
je 0x417632
mov dword [rax + 0x44], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
mov edx, 1
mov dword [rsi + 0x70], eax
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rsi + 0x30], rax
movabs rax, 0x1feedbab1
mov rbx, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov qword [rsi + 0x38], 0xffffffffffffffff
mov qword [rsi + 0x60], 0
mov qword [rsi + 0x68], rax
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 dword [rsp + 0x28], 0
lea r9, [rsi + 0x28]
mov dword [rsp + 0x20], 0
mov r8, rbp
mov rdx, rdi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x4177ad
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov dword [rsi + 0xc0], eax
movzx eax, byte [rsi + 0x40]
mov dword [rsi + 0xbc], 0
and eax, 0xffffffcf
or eax, 0x10
mov byte [rsi + 0x40], al
mov rax, qword [0x0049d468]
test rax, rax
je 0x417789
mov rdx, rsi
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x4177ad
mov rbx, rsi
jmp 0x417632
lea rcx, str._pthread_tls_once_shmem
xor r8d, r8d
mov edx, 4
call sym.__shmem_winpthreads_grab
mov qword [0x0049d470], rax
mov rcx, rax
jmp 0x417608
lea r8, [sym.__shmem_winpthreads_init__pthread_tls_shmem]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call sym.__shmem_winpthreads_grab
mov qword [0x0049d468], rax
jmp 0x417622
lea r8, [sym.__shmem_winpthreads_init__pthread_tls_shmem]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call sym.__shmem_winpthreads_grab
mov qword [0x0049d468], rax
jmp 0x41772b
call sym.abort
nop
nop word cs:[rax + rax]