joyce8/EMBER2024-capa huggingface dataset:
Function at 0x180088030
Capabilities:
Log keystrokes

Disassembly:
push rdi
sub rsp, 0x220
lea rdi, [rsp + 0x40]
mov ecx, 0x78
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rax, qword [0x1800e7f10]
xor rax, rsp
mov qword [rsp + 0x210], rax
lea rax, [rsp + 0x60]
mov rdi, rax
xor eax, eax
mov ecx, 0x100
rep stosb byte [rdi], al
mov r8d, 0x6d1
xor edx, edx
lea rcx, [0x18013a3b2]
call sub.VCRUNTIME140.dll_memset
mov dword [rsp + 0x40], 0x20
jmp 0x180088095
mov eax, dword [rsp + 0x40]
inc eax
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0x15c
jg 0x180088299
movsxd rax, dword [rsp + 0x40]
lea rcx, [0x18013a0f8]
movsx eax, word [rcx + rax*2]
mov dword [rsp + 0x168], eax
cmp dword [rsp + 0x168], 0xffffffff
jne 0x1800880c6
jmp 0x18008808b
cmp dword [rsp + 0x40], 0x140
jl 0x1800881a2
cmp dword [rsp + 0x40], 0x14e
jg 0x1800881a2
mov dword [rsp + 0x1b8], 0x60
mov dword [rsp + 0x1bc], 0x61
mov dword [rsp + 0x1c0], 0x62
mov dword [rsp + 0x1c4], 0x63
mov dword [rsp + 0x1c8], 0x64
mov dword [rsp + 0x1cc], 0x65
mov dword [rsp + 0x1d0], 0x66
mov dword [rsp + 0x1d4], 0x67
mov dword [rsp + 0x1d8], 0x68
mov dword [rsp + 0x1dc], 0x69
mov dword [rsp + 0x1e0], 0x6e
mov dword [rsp + 0x1e4], 0x6f
mov dword [rsp + 0x1e8], 0x6a
mov dword [rsp + 0x1ec], 0x6d
mov dword [rsp + 0x1f0], 0x6b
mov eax, dword [rsp + 0x40]
sub eax, 0x140
cdqe
mov eax, dword [rsp + rax*4 + 0x1b8]
mov dword [rsp + 0x164], eax
jmp 0x1800881bb
mov edx, 1
mov ecx, dword [rsp + 0x168]
call qword [sym.imp.USER32.dll_MapVirtualKeyW]
mov dword [rsp + 0x164], eax
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x10
lea r9, [rsp + 0x178]
lea r8, [rsp + 0x60]
mov edx, dword [rsp + 0x168]
mov ecx, dword [rsp + 0x164]
call qword [sym.imp.USER32.dll_ToUnicode]
mov dword [rsp + 0x16c], eax
cmp dword [rsp + 0x16c], 0xffffffff
jne 0x180088235
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x10
lea r9, [rsp + 0x178]
lea r8, [rsp + 0x60]
mov edx, dword [rsp + 0x168]
mov ecx, dword [rsp + 0x164]
call qword [sym.imp.USER32.dll_ToUnicode]
mov dword [rsp + 0x16c], eax
cmp dword [rsp + 0x16c], 1
jge 0x180088244
jmp 0x18008808b
movsxd rax, dword [rsp + 0x40]
imul rax, rax, 5
lea rcx, [0x18013a3b2]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 5
mov qword [rsp + 0x20], rax
mov r9d, 1
lea r8, [rsp + 0x178]
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
jmp 0x18008808b
mov rcx, rsp
lea rdx, [0x1800aac60]
call fcn.18008d5cc
mov rcx, qword [rsp + 0x210]
xor rcx, rsp
call fcn.18008c960
add rsp, 0x220
pop rdi
ret
Function at 0x18008b320
Capabilities:
Link many functions at runtime

Disassembly:
push rdi
sub rsp, 0x70
lea rdi, [rsp + 0x20]
mov ecx, 0x14
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rax, qword [0x1800e7f10]
xor rax, rsp
mov qword [rsp + 0x60], rax
lea rax, str.libOSMesa.dll
mov qword [rsp + 0x38], rax
lea rax, str.OSMesa.dll
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], 0
cmp qword [0x18013ad08], 0
je 0x18008b37b
mov eax, 1
jmp 0x18008b4fb
mov dword [rsp + 0x20], 0
jmp 0x18008b38f
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
movsxd rax, dword [rsp + 0x20]
cmp qword [rsp + rax*8 + 0x38], 0
je 0x18008b3c1
movsxd rax, dword [rsp + 0x20]
mov rcx, qword [rsp + rax*8 + 0x38]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [0x18013ad08], rax
cmp qword [0x18013ad08], 0
je 0x18008b3bf
jmp 0x18008b3c1
jmp 0x18008b385
cmp qword [0x18013ad08], 0
jne 0x18008b3e3
lea rdx, str.OSMesa:_Library_not_found
mov ecx, 0x10006
call fcn.1800809a0
xor eax, eax
jmp 0x18008b4fb
lea rdx, str.OSMesaCreateContextExt
mov rcx, qword [0x18013ad08]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x18013ad10], rax
lea rdx, str.OSMesaCreateContextAttribs
mov rcx, qword [0x18013ad08]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x18013ad18], rax
lea rdx, str.OSMesaDestroyContext
mov rcx, qword [0x18013ad08]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x18013ad20], rax
lea rdx, str.OSMesaMakeCurrent
mov rcx, qword [0x18013ad08]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x18013ad28], rax
lea rdx, str.OSMesaGetColorBuffer
mov rcx, qword [0x18013ad08]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x18013ad30], rax
lea rdx, str.OSMesaGetDepthBuffer
mov rcx, qword [0x18013ad08]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x18013ad38], rax
lea rdx, str.OSMesaGetProcAddress
mov rcx, qword [0x18013ad08]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x18013ad40], rax
cmp qword [0x18013ad10], 0
je 0x18008b4dc
cmp qword [0x18013ad20], 0
je 0x18008b4dc
cmp qword [0x18013ad28], 0
je 0x18008b4dc
cmp qword [0x18013ad30], 0
je 0x18008b4dc
cmp qword [0x18013ad38], 0
je 0x18008b4dc
cmp qword [0x18013ad40], 0
jne 0x18008b4f6
lea rdx, str.OSMesa:_Failed_to_load_required_entry_points
mov ecx, 0x10008
call fcn.1800809a0
call fcn.18008b530
xor eax, eax
jmp 0x18008b4fb
mov eax, 1
mov rdi, rax
mov rcx, rsp
lea rdx, [0x1800ab0b0]
call fcn.18008d5cc
mov rax, rdi
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.18008c960
add rsp, 0x70
pop rdi
ret
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x140034370]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x140034380]
mov dword [rax], 1
mov rax, qword [0x140034390]
mov dword [rax], 1
mov rax, qword [0x140034360]
mov dword [rax], 1
mov rax, qword [0x1400341f0]
cmp word [rax], 0x5a4d
jne 0x140001067
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010d0
mov rax, qword [0x140034350]
mov dword [0x14003900c], ecx
mov eax, dword [rax]
test eax, eax
jne 0x1400010c0
mov ecx, 1
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x140034310]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x1400342f0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x140034170]
cmp dword [rax], 1
je 0x140001108
xor eax, eax
add rsp, 0x28
ret
mov ecx, 2
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 0x140009543
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 0x140009573
mov rax, qword [rbp + 0x18]
mov rcx, rax
call sym.nimCStrLen_2
mov rdx, rax
jmp 0x140009578
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 qword [rbp - 8], rax
mov dword [rbp - 0xc], 0
mov rcx, qword [rbp + 0x10]
call sym.fflush
mov dword [rbp - 0xc], eax
nop
add rsp, 0x30
pop rbp
ret
Function at 0x140014806
Capabilities:
Write file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0xa0
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
lea rax, str.echoBinSafe
mov qword [rbp - 0x58], rax
lea rax, [0x140030768]
mov qword [rbp - 0x48], rax
mov qword [rbp - 0x50], 0
mov word [rbp - 0x40], 0
lea rax, [rbp - 0x60]
mov rcx, rax
call sym.nimFrame_7
call sym.nimErrorFlag_5
mov qword [rbp - 0x10], rax
mov qword [rbp - 0x50], 0xac5
lea rcx, [0x140039080]
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov qword [rbp - 0x18], 0
mov qword [rbp - 0x50], 0xd
lea rax, [0x140030fd8]
mov qword [rbp - 0x48], rax
mov qword [rbp - 8], 0
mov qword [rbp - 0x50], 0xe
mov rax, qword [rbp - 8]
cmp rax, qword [rbp + 0x18]
jge 0x140014990
mov qword [rbp - 0x50], 0xac6
lea rax, [0x140030768]
mov qword [rbp - 0x48], rax
cmp qword [rbp - 8], 0
js 0x1400148c7
mov rax, qword [rbp - 8]
cmp rax, qword [rbp + 0x18]
jl 0x1400148e0
mov rax, qword [rbp + 0x18]
lea rdx, [rax - 1]
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.raiseIndexError2
jmp 0x140014a1b
mov rax, qword [rbp - 8]
shl rax, 4
mov rdx, rax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x18], rax
mov ecx, 1
mov rax, qword [dbg.__acrt_iob_func]
call rax
mov rcx, rax
mov rax, qword [rbp - 0x18]
mov rdx, qword [rax + 8]
mov rax, qword [rax]
mov qword [rbp - 0x80], rax
mov qword [rbp - 0x78], rdx
lea rax, [rbp - 0x80]
mov r8d, 0
mov rdx, rax
call sym.writeWindows__system_u9111
mov rax, qword [rbp - 0x10]
movzx eax, byte [rax]
movzx eax, al
test eax, eax
jne 0x140014a1a
mov qword [rbp - 0x50], 0x10
lea rax, [0x140030fd8]
mov qword [rbp - 0x48], rax
mov edx, 0
mov rax, qword [rbp - 8]
add rax, 1
jno 0x140014965
mov edx, 1
mov rcx, rax
lea rax, [rbp - 0x68]
mov qword [rax], rcx
mov rax, rdx
and eax, 1
test al, al
je 0x140014983
call sym.raiseOverflow
jmp 0x140014a1b
mov rax, qword [rbp - 0x68]
mov qword [rbp - 8], rax
jmp 0x140014895
nop
mov qword [rbp - 0x50], 0xae1
lea rax, [0x140030768]
mov qword [rbp - 0x48], rax
mov qword [rbp - 0x20], 0
mov ecx, 1
mov rax, qword [dbg.__acrt_iob_func]
call rax
mov r9, rax
mov r8d, 1
mov edx, 1
lea rcx, [0x140030f71]
call sym.fwrite
mov qword [rbp - 0x20], rax
mov qword [rbp - 0x50], 0xae2
mov dword [rbp - 0x24], 0
mov ecx, 1
mov rax, qword [dbg.__acrt_iob_func]
call rax
mov rcx, rax
call sym.fflush
mov dword [rbp - 0x24], eax
mov qword [rbp - 0x50], 0xae6
lea rcx, [0x140039080]
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x140014a1b
nop
call sym.popFrame_7
nop
add rsp, 0xa0
pop rbp
ret
Function at 0x140026ef0
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 0x140026f60
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x1400394c4]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x140027110
mov rax, qword [0x1400394c8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x140026fac
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x140027037
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x140026f90
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
je 0x14002716d
mov rax, qword [0x1400394c8]
lea rdi, [rdi + rdi*4]
shl rdi, 3
add rax, rdi
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call dbg._GetPEImageBase
mov ecx, dword [rbp + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x1400394c8]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140027152
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140027030
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x1400270c0
add dword [0x1400394c4], 1
cmp ebx, 8
jae 0x140027068
test bl, 4
jne 0x140027120
test ebx, ebx
je 0x140027059
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x140027140
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rax, qword [rsi]
lea rcx, [r12 + 8]
and rcx, 0xfffffffffffffff8
mov qword [r12], rax
mov eax, ebx
mov rdx, qword [rsi + rax - 8]
mov qword [r12 + rax - 8], rdx
sub r12, rcx
add ebx, r12d
sub rsi, r12
and ebx, 0xfffffff8
cmp ebx, 8
jb 0x140027059
and ebx, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov r8, qword [rsi + rdx]
mov qword [rcx + rdx], r8
cmp eax, ebx
jb 0x14002709a
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
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 rdi, qword [0x1400394c8]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140027030
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
xor edi, edi
jmp 0x140026fb7
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x140027059
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x140027059
mov rax, qword [0x1400394c8]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rdi + 0x18]
call dbg.__report_error
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop dword [rax]
Function at 0x140027680
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x140039520]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140039500]
test rbx, rbx
je 0x1400276d4
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 0x1400276cb
test r12, r12
je 0x1400276cb
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x1400276b0
lea rcx, [0x140039520]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x140027900
Capabilities:
Parse pe header

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

Function at 0x140027920
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 0x140027965
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp r8, rdx
ja 0x14002795c
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x140027967
add rax, 0x28
cmp rax, r9
jne 0x140027948
xor eax, eax
ret

Function at 0x140027a10
Capabilities:
Enumerate pe sections

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

Function at 0x140027b70
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x1400341f0]
xor eax, eax
cmp word [r9], 0x5a4d
mov r8, rcx
jne 0x140027bdf
mov rcx, r9
call sym._ValidateImageBase.part.0
test eax, eax
je 0x140027bdf
movsxd rax, dword [r9 + 0x3c]
mov rcx, r8
sub rcx, r9
add r9, rax
movzx eax, word [r9 + 0x14]
movzx edx, word [r9 + 6]
lea rax, [r9 + rax + 0x18]
test edx, edx
je 0x140027bdd
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x140027bd4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140027be8
add rax, 0x28
cmp rax, r9
jne 0x140027bc0
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret
Function at 0x140027c00
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x1400341f0]
xor r9d, r9d
cmp word [r11], 0x5a4d
mov r8d, ecx
jne 0x140027c78
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x140027c78
movsxd rcx, dword [r11 + 0x3c]
add rcx, r11
mov eax, dword [rcx + 0x90]
test eax, eax
je 0x140027c78
movzx edx, word [rcx + 0x14]
lea rdx, [rcx + rdx + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x140027c78
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r10, [rdx + rcx*8 + 0x28]
nop dword [rax + rax]
mov r9d, dword [rdx + 0xc]
mov rcx, r9
cmp rax, r9
jb 0x140027c6c
add ecx, dword [rdx + 8]
cmp rax, rcx
jb 0x140027c80
add rdx, 0x28
cmp rdx, r10
jne 0x140027c58
xor r9d, r9d
mov rax, r9
add rsp, 0x28
ret
add rax, r11
jmp 0x140027c90
sub r8d, 1
add rax, 0x14
mov ecx, dword [rax + 4]
test ecx, ecx
jne 0x140027c9e
mov edx, dword [rax + 0xc]
test edx, edx
je 0x140027c75
test r8d, r8d
jg 0x140027c88
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
add rsp, 0x28
ret

Function at 0x140027df0
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
xor ecx, ecx
xor r9d, r9d
mov r8d, 0xffff
mov dword [0x1400395a0], 0xffffffff
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
mov qword [0x1400395a8], rax
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov ecx, eax
cmp eax, 0xffffffff
je 0x140027e40
lea rdx, [0x140027d00]
mov dword [0x140039598], eax
call dbg.__mingwthr_key_dtor
test eax, eax
jne 0x140027e48
add rsp, 0x28
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140027e37
call sym.abort
nop
nop
Function at 0x140027e50
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
mov r13, qword [0x140034160]
mov r11d, dword [r13]
mov r12, rcx
test r11d, r11d
jne 0x140027e90
mov rax, qword [rcx + 0x10]
test rax, rax
je 0x140027ef8
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
ret
mov rsi, qword [rcx + 0x10]
test rsi, rsi
je 0x140027f10
mov r13d, dword [0x140039598]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
call rdi
mov r14d, eax
mov ecx, r13d
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, r14d
mov r13, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test r13, r13
je 0x140027f88
mov rbx, qword [r13]
cmp rbx, rsi
jb 0x140027fd0
sub rsi, 1
mov rax, qword [r13 + rsi*8 + 8]
test rax, rax
jne 0x140027e79
mov rcx, r12
call fcn.140027d50
mov qword [r13 + rsi*8 + 8], rax
jmp 0x140027e79
call fcn.140027d50
mov qword [r12 + 0x10], rax
jmp 0x140027e79
mov r10d, dword [r13]
test r10d, r10d
je 0x140028032
mov r9d, dword [0x14002e5c0]
test r9d, r9d
je 0x140028060
lock add dword [0x1400395a0], 1
jne 0x140028094
mov rsi, qword [r12 + 0x10]
test rsi, rsi
je 0x140028040
mov eax, dword [r13]
test eax, eax
je 0x140027e99
mov eax, 0xffffffff
lock xadd dword [0x1400395a0], eax
sub eax, 1
js 0x140027e99
mov rcx, qword [0x1400395a8]
xor r8d, r8d
mov edx, 1
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
jmp 0x140027e99
lea rcx, [rsi + 0x21]
mov edx, 8
lea rbx, [rsi + 0x20]
call sym.calloc
mov r13, rax
test rax, rax
je 0x1400280bb
mov qword [rax], rbx
mov ecx, dword [0x140039598]
mov rdx, r13
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x140027ed7
call rdi
jmp 0x140027ed7
lea r14, [rbx + rbx]
lea rax, [rsi + 0x20]
mov rcx, r13
cmp rsi, r14
cmova r14, rax
lea rdx, [r14*8 + 8]
call sym.realloc
mov r13, rax
test rax, rax
je 0x1400280bb
mov qword [rax], r14
sub r14, rbx
lea rcx, [rax + rbx*8 + 8]
xor edx, edx
lea r8, [r14*8]
call sym.memset
jmp 0x140027fa9
call fcn.140027df0
mov dword [0x14002e5c0], 1
mov edx, dword [r13]
test edx, edx
jne 0x140027f2d
mov rsi, qword [r12 + 0x10]
test rsi, rsi
jne 0x140027e99
mov rax, qword [0x140039590]
lea rsi, [rax + 1]
mov qword [0x140039590], rsi
mov qword [r12 + 0x10], rsi
jmp 0x140027f49
lock add dword [0x14002e5c4], 1
je 0x140028017
mov r8d, dword [0x14002e5c0]
mov rsi, qword [sym.imp.KERNEL32.dll_Sleep]
lea rbx, [0x14002e5c0]
test r8d, r8d
jne 0x140028026
nop dword [rax]
xor ecx, ecx
call rsi
mov ecx, dword [rbx]
test ecx, ecx
je 0x140028088
jmp 0x140028026
mov rcx, qword [0x1400395a8]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x140027f3b
lock sub dword [0x1400395a0], 1
jmp 0x140027f3b
call sym.abort
nop
nop word cs:[rax + rax]
nop dword [rax]
Function at 0x140015250
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov edi, r8d
mov rsi, rdx
mov rbp, rcx
call qword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_LoadResource]
test rax, rax
je 0x1400152c5
mov rcx, rax
call qword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_LockResource]
mov rbx, rax
test rax, rax
je 0x1400152c5
mov rdx, rsi
mov rcx, rbp
call qword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_SizeofResource]
mov ecx, eax
add rcx, rbx
and edi, 0xf
jbe 0x1400152b5
nop
cmp rbx, rcx
jae 0x1400152c5
movzx eax, word [rbx]
lea rbx, [rbx + rax*2]
add rbx, 2
add edi, 0xffffffff
jne 0x1400152a0
cmp rbx, rcx
jae 0x1400152c5
cmp word [rbx], 0
je 0x1400152c5
mov rax, rbx
jmp 0x1400152c7
xor eax, eax
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x140018ab0
Capabilities:
Print debug messages

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r14
push r15
mov eax, 0x2070
call fcn.1401472c0
sub rsp, rax
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov rax, qword [0x1402f2080]
xor rax, rsp
mov qword [rsp + 0x2060], rax
mov rdi, r9
mov ebp, r8d
mov r14d, edx
mov rsi, rcx
mov r15, qword [rsp + 0x20e0]
mov r12, qword [rsp + 0x20e8]
cmp r8d, dword [rsp + 0x20d0]
jg 0x140018c39
mov edx, 0x5c
call fcn.1401645c8
mov rbx, rax
test rax, rax
je 0x140018b25
add rbx, 2
jmp 0x140018b28
mov rbx, rsi
xor edx, edx
mov r8d, 0x1000
lea rcx, [rsp + 0x1060]
call fcn.1401659c0
xor edx, edx
mov r8d, 0x1000
lea rcx, [rsp + 0x60]
call fcn.1401659c0
call fcn.140018900
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], 0
mov r9, r15
mov r8d, 0x800
lea rdx, [rsp + 0x1060]
mov rcx, qword [rax]
call fcn.140172734
cmp qword [rdi + 0x18], 8
jb 0x140018b85
mov rdi, qword [rdi]
lea rax, [rsp + 0x1060]
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x38], ebp
mov dword [rsp + 0x30], r14d
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rdi
lea r9, str._s__s__d____d_:_trace__s_n
mov rbx, 0xffffffffffffffff
mov r8, rbx
mov edx, 0x800
lea rcx, [rsp + 0x60]
call fcn.140018960
cmp qword [0x1402f4788], 0
je 0x140018c2e
lea rdi, [0x140303c00]
mov qword [rsp + 0x58], rdi
mov rcx, rdi
call fcn.140126b90
test eax, eax
je 0x140018bef
mov ecx, eax
call fcn.1401267a8
nop
lea rax, [rsp + 0x60]
inc rbx
cmp word [rax + rbx*2], 0
jne 0x140018bf4
mov r8, rbx
lea rdx, [rsp + 0x60]
lea rcx, [0x1402f47b8]
call fcn.140019760
nop
mov rcx, rdi
call fcn.140126bb4
test eax, eax
je 0x140018c27
mov ecx, eax
call fcn.1401267a8
nop
call fcn.140018c60
jmp 0x140018c39
lea rcx, [rsp + 0x60]
call qword [sym.imp.api_ms_win_core_debug_l1_1_0.dll_OutputDebugStringW]
mov rcx, qword [rsp + 0x2060]
xor rcx, rsp
call fcn.140146480
add rsp, 0x2070
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret