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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0x250
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x240], rax
mov rbp, rcx
xor edx, edx
lea rcx, [rsp + 0x30]
mov r8d, 0x20a
call fcn.18000bd00
xor r14d, r14d
lea rcx, [0x180022e98]
xor r8d, r8d
mov qword [rsp + 0x20], r14
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov esi, eax
lea rax, [rsi + rsi]
cmp rax, rsi
jbe 0x18000a867
mov rcx, rax
call fcn.180001ac0
mov r8d, esi
lea rcx, str.PATH
mov rdx, rax
mov rdi, rax
mov rbx, rax
mov word [rax], r14w
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x18000a853
movzx ecx, word [rbx]
test cx, cx
je 0x18000a853
mov esi, 0x104
cmp cx, 0x20
je 0x18000a891
cmp cx, 0x3b
je 0x18000a891
test cx, cx
je 0x18000a853
mov eax, r14d
lea rdx, [rsp + 0x30]
cmp cx, 0x3b
je 0x18000a81f
inc eax
cmp eax, esi
jge 0x18000a81f
add rbx, 2
mov word [rdx], cx
add rdx, 2
movzx ecx, word [rbx]
test cx, cx
jne 0x18000a800
mov word [rdx], r14w
test eax, eax
je 0x18000a84b
cmp eax, esi
jge 0x18000a84b
mov r9, rbp
lea r8, [rsp + 0x20]
lea rdx, [0x180022eb8]
lea rcx, [rsp + 0x30]
call fcn.180009fac
cmp qword [rsp + 0x20], r14
jne 0x18000a89d
movzx ecx, word [rbx]
test cx, cx
jne 0x18000a7df
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.18000abd0
lea r11, [rsp + 0x250]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret
add rbx, 2
movzx ecx, word [rbx]
jmp 0x18000a7df
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rax, qword [rsp + 0x20]
jmp 0x18000a869

Function at 0x18000a96c
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov ebx, ecx
xor edi, edi
mov rcx, qword [0x180028b30]
test rcx, rcx
jne 0x18000a9a5
call fcn.18000a8b8
test rax, rax
lea rcx, [0x180000000]
cmovne rcx, rax
mov qword [0x180028b30], rcx
xor r9d, r9d
mov eax, ebx
sar eax, 4
lea esi, [r9 + 1]
add ax, si
lea edx, [rsi + 5]
movzx r8d, ax
call qword [sym.imp.KERNEL32.dll_FindResourceExW]
test rax, rax
jne 0x18000a9cf
lea rax, [0x18002235c]
jmp 0x18000aa22
mov rcx, qword [0x180028b30]
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rcx, rax
test rax, rax
jne 0x18000a9f0
lea rax, [0x18002238c]
jmp 0x18000aa22
and ebx, 0x8000000f
jge 0x18000a9ff
sub ebx, esi
or ebx, 0xfffffff0
add ebx, esi
test ebx, ebx
je 0x18000aa12
movzx eax, word [rcx]
lea rcx, [rcx + rax*2]
add rcx, 2
sub ebx, esi
jne 0x18000aa03
lea rax, [0x1800223b4]
cmp word [rcx], di
je 0x18000aa22
lea rax, [rcx + 2]
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
Function at 0x40225e
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x20
mov rax, qword [0x004cc200]
test rax, rax
je 0x402271
call rax
mov ecx, 2
call qword [fcn.00418290]
mov r8d, 0xe
mov edx, 1
lea rcx, str.out_of_memory_n
mov rbx, rax
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rcx, rbx
call sub.msvcrt.dll_fflush
mov ecx, 1
call sub.msvcrt.dll_exit
nop

Function at 0x407790
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Execute shellcode via windows callback function

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov r9d, 0x40
mov r8d, 0x1000
mov rbx, rdx
mov rsi, rcx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r8, rbx
mov rdx, rsi
mov rcx, rax
call sub.msvcrt.dll_memmove
xor r8d, r8d
xor edx, edx
mov ecx, 0x10000
mov r9, rax
add rsp, 0x28
pop rbx
pop rsi
jmp qword [sym.imp.CRYPT32.dll_CertEnumSystemStore]

Function at 0x407800
Capabilities:
Execute shellcode via indirect call
Execute shellcode via windows callback function

Disassembly:
mov rax, qword [0x004c63d0]
movsxd rdx, dword [rax]
mov rax, qword [0x004c63c0]
mov rcx, qword [rax]
jmp fcn.00407790
sub rsp, 0x28
call fcn.004077eb
nop
add rsp, 0x28
jmp 0x407800

Function at 0x40781b
Capabilities:
Execute shellcode via indirect call
Execute shellcode via windows callback function

Disassembly:
mov rax, qword [0x004c63d0]
movsxd rdx, dword [rax]
mov rax, qword [0x004c63c0]
mov rcx, qword [rax]
jmp fcn.00407790
sub rsp, 0x28
call fcn.004077eb
nop
add rsp, 0x28
jmp 0x407800
Function at 0x411640
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 0x4117c8
mov rax, qword [0x004cc848]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x41168c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x411715
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x411670
mov rcx, rbx
call fcn.004122e0
test rax, rax
mov r12, rax
je 0x4117fd
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.00412410
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 0x4117e0
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x41170e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x411770
add dword [0x004cc844], 1
cmp edi, 8
jae 0x411743
test dil, 4
jne 0x4117b4
test edi, edi
je 0x411738
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x4117cf
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 0x411738
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 0x41175c
jmp 0x411738
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 0x41170e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.0041b200
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x411738
xor esi, esi
jmp 0x411697
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x411738
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.0041b200
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.0041b200
nop
nop dword [rax]

Function at 0x411f50
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 0x411fa4
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 0x411f9b
test rsi, rsi
je 0x411f9b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x411f80
lea rcx, [0x004ccb20]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x4122e0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x004c6280]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x41234d
mov rcx, r8
call fcn.004121c0
test eax, eax
je 0x41234d
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 0x41234d
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 0x412344
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x41234f
add rax, 0x28
cmp rax, r9
jne 0x412330
xor eax, eax
add rsp, 0x28
ret

Function at 0x412a10
Capabilities:
Allocate thread local storage

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

Function at 0x412b60
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 0x412c04
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 0x412c24
test r13, r13
je 0x412bdb
mov qword [rsp + 0x20], rbx
mov r9, rsi
mov r8, qword [rsi]
mov edx, 0xa
mov ecx, 1
call r13
cmp eax, 7
je 0x412c29
cmp eax, 8
jne 0x412c24
mov rax, qword [rbx]
mov r13, qword [rax]
mov eax, dword [0x0041c458]
test eax, eax
js 0x412c60
test eax, eax
jne 0x412c40
mov qword [0x004ccb78], r13
mov rax, qword [rbx]
mov rax, qword [rax]
test rax, rax
mov qword [rbx], rax
jne 0x412b90
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 0x412c70
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 0x412bf6
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x412bf6
call fcn.00412a50
mov eax, dword [0x0041c458]
jmp 0x412beb
mov eax, 5
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
Function at 0x412c90
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 0x412d10
test eax, eax
jne 0x412cc3
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 0x412cba
mov rax, rsi
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp rax
call fcn.00412a50
mov eax, dword [0x0041c458]
jmp 0x412ca5

Function at 0x412d20
Capabilities:
Set thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
mov eax, dword [0x0041c458]
mov rbx, qword [rcx]
test eax, eax
js 0x412d62
test eax, eax
jne 0x412d43
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 0x412d3d
add rsp, 0x20
pop rbx
jmp qword [sym.imp.KERNEL32.dll_GetLastError]
call fcn.00412a50
mov eax, dword [0x0041c458]
jmp 0x412d32
Function at 0x412e30
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 0x412f30
test eax, eax
mov rdi, qword [0x004ccb78]
jne 0x412f00
test rdi, rdi
mov qword [rsp + 0x38], rdi
je 0x412ee0
lea rsi, [rsp + 0x38]
mov rax, rdi
jmp 0x412e87
cmp eax, 8
jne 0x412ef0
mov rax, qword [rsp + 0x38]
mov rax, qword [rax]
test rax, rax
mov qword [rsp + 0x38], rax
je 0x412ee0
mov rax, qword [rax + 0x30]
test rax, rax
je 0x412e75
mov qword [rsp + 0x20], rsi
mov r9, rbx
mov r8, qword [rbx]
mov edx, 1
mov ecx, 1
call rax
cmp eax, 6
jne 0x412e70
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.00412980
cmp eax, 7
je 0x412f40
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 0x412e57
call fcn.00412a50
mov eax, dword [0x0041c458]
jmp 0x412e48
mov rcx, rsi
call fcn.00412af0
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 0x412fd0
test ecx, ecx
mov rsi, qword [0x004ccb78]
jne 0x412fa5
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.00412b60
cmp eax, 7
je 0x412fdd
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 0x412f78
call fcn.00412a50
mov ecx, dword [0x0041c458]
jmp 0x412f6d
mov rcx, rsi
call fcn.00412af0
nop
nop word cs:[rax + rax]
Function at 0x412f50
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 0x412f30
test eax, eax
mov rdi, qword [0x004ccb78]
jne 0x412f00
test rdi, rdi
mov qword [rsp + 0x38], rdi
je 0x412ee0
lea rsi, [rsp + 0x38]
mov rax, rdi
jmp 0x412e87
cmp eax, 8
jne 0x412ef0
mov rax, qword [rsp + 0x38]
mov rax, qword [rax]
test rax, rax
mov qword [rsp + 0x38], rax
je 0x412ee0
mov rax, qword [rax + 0x30]
test rax, rax
je 0x412e75
mov qword [rsp + 0x20], rsi
mov r9, rbx
mov r8, qword [rbx]
mov edx, 1
mov ecx, 1
call rax
cmp eax, 6
jne 0x412e70
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.00412980
cmp eax, 7
je 0x412f40
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 0x412e57
call fcn.00412a50
mov eax, dword [0x0041c458]
jmp 0x412e48
mov rcx, rsi
call fcn.00412af0
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 0x412fd0
test ecx, ecx
mov rsi, qword [0x004ccb78]
jne 0x412fa5
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.00412b60
cmp eax, 7
je 0x412fdd
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 0x412f78
call fcn.00412a50
mov ecx, dword [0x0041c458]
jmp 0x412f6d
mov rcx, rsi
call fcn.00412af0
nop
nop word cs:[rax + rax]

Function at 0x413080
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 0x4130c5
mov edx, dword [0x0041c458]
test edx, edx
js 0x413103
test edx, edx
mov rsi, qword [0x004ccb78]
jne 0x4130e0
mov qword [rsp + 0x28], rsi
lea rsi, [rsp + 0x28]
mov rcx, rbx
mov rdx, rsi
call fcn.00412b60
cmp eax, 7
je 0x4130d2
call sub.msvcrt.dll_abort
call fcn.00412e30
add rsp, 0x30
pop rbx
pop rsi
pop rdi
ret
mov rcx, rsi
call fcn.00412af0
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 0x4130a6
call fcn.00412a50
mov edx, dword [0x0041c458]
mov rsi, qword [0x004ccb78]
test edx, edx
je 0x4130a6
jmp 0x4130e0
Function at 0x4132e0
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 0x413330
lea rdx, [0x00413200]
mov ecx, eax
mov dword [0x004ccb88], eax
call fcn.00418600
test eax, eax
jne 0x413338
add rsp, 0x28
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x413327
call sub.msvcrt.dll_abort
nop
nop
Function at 0x413340
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 [0x004c6160]
mov r11d, dword [rsi]
mov rbx, rcx
test r11d, r11d
jne 0x413374
mov rax, qword [rcx + 0x10]
test rax, rax
je 0x4133d1
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 0x413420
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 0x4133e0
mov r12, qword [rsi]
cmp r12, rdi
jb 0x413490
lea rsi, [rsi + rdi*8]
mov rax, qword [rsi]
test rax, rax
jne 0x413367
mov rcx, rbx
call fcn.00413240
mov qword [rsi], rax
jmp 0x413367
call fcn.00413240
mov qword [rbx + 0x10], rax
jmp 0x413367
lea rcx, [rdi + 0x21]
mov edx, 8
call sub.msvcrt.dll_calloc
lea r12, [rdi + 0x20]
test rax, rax
mov rsi, rax
je 0x413572
mov qword [rax], r12
mov rdx, rsi
mov ecx, dword [0x004ccb88]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x4133b8
call rbp
jmp 0x4133b8
mov r10d, dword [rsi]
test r10d, r10d
je 0x413446
mov r9d, dword [0x0041c460]
test r9d, r9d
je 0x4134da
lock add dword [0x004ccb90], 1
jne 0x413525
mov rdi, qword [rbx + 0x10]
test rdi, rdi
je 0x41350a
mov eax, dword [rsi]
test eax, eax
je 0x413381
mov eax, 0xffffffff
lock xadd dword [0x004ccb90], eax
sub eax, 1
js 0x413381
xor r8d, r8d
mov edx, 1
mov rcx, qword [0x004ccb98]
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
jmp 0x413381
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 0x413572
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 0x413401
lock add dword [0x0041c464], 1
jne 0x41354c
call fcn.004132e0
mov dword [0x0041c460], 1
mov edx, dword [rsi]
test edx, edx
jne 0x413438
mov rdi, qword [rbx + 0x10]
test rdi, rdi
jne 0x413381
mov rax, qword [0x004ccb80]
lea rdi, [rax + 1]
mov qword [0x004ccb80], rdi
mov qword [rbx + 0x10], rdi
jmp 0x413453
mov edx, 0xffffffff
mov rcx, qword [0x004ccb98]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x413446
lock sub dword [0x004ccb90], 1
jmp 0x413446
mov r8d, dword [0x0041c460]
lea rdi, [0x0041c460]
mov rbp, qword [sym.imp.KERNEL32.dll_Sleep]
test r8d, r8d
jne 0x4134f3
xor ecx, ecx
call rbp
mov ecx, dword [rdi]
test ecx, ecx
je 0x413566
jmp 0x4134f3
call sub.msvcrt.dll_abort
nop
nop dword [rax + rax]
cmp qword [rcx], rdx
jae 0x413590
mov qword [rcx], rdx
mov qword [rcx + 0x18], 0
cmp qword [rcx + 8], r8
jae 0x41359a
mov qword [rcx + 8], r8
test r9, r9
je 0x4135a4
cmp qword [rcx], rdx
je 0x4135a5
ret
mov qword [rcx + 0x18], r9
ret
Function at 0x414270
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 0x4142c5
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 0x4142b0
mov edx, dword [rbx + 0x2c]
cmp edx, 0xffffffff
je 0x414340
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.00413b20
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.004136f0
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.00413f90
mov eax, dword [0x0041c480]
cmp eax, 0xffffffff
je 0x414376
test eax, eax
je 0x414366
mov edx, 2
mov dword [rbx + 0x2c], edx
jmp 0x4142cd
mov dword [0x0041c480], 0
call fcn.00418390
mov edx, 3
test al, 1
jne 0x41434f
jmp 0x414354
lea rcx, str.PRINTF_EXPONENT_DIGITS
call sub.msvcrt.dll_getenv
test rax, rax
je 0x41435c
movsx eax, byte [rax]
sub eax, 0x30
cmp eax, 2
ja 0x41435c
mov dword [0x0041c480], 1
jmp 0x41434f

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

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

Function at 0x41b200
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.00418290
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.00418290
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