joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400aa310
Capabilities:
Encrypt or decrypt data via bcrypt

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x60
mov rbx, r9
mov r15, r8
mov rdi, rdx
mov r14, rcx
test rcx, rcx
je 0x1400aa54f
test rdx, rdx
je 0x1400aa54f
test r8, r8
je 0x1400aa54f
test rbx, rbx
je 0x1400aa54f
mov ecx, dword [r9 + 8]
mov ebp, dword [r8 + 8]
add ecx, 0x18
add ebp, ecx
mov dword [rsp + 0x50], 0x18
mov ecx, ebp
mov r12d, ebp
call fcn.140036114
mov rsi, rax
test rax, rax
je 0x1400aa54f
mov dword [rax], 0x31415352
mov ecx, dword [rbx + 8]
shl ecx, 3
mov dword [rax + 4], ecx
mov ecx, dword [r15 + 8]
mov dword [rax + 8], ecx
mov ecx, dword [rbx + 8]
mov dword [rax + 0xc], ecx
mov qword [rsp + 0x98], r13
xor r13d, r13d
mov qword [rax + 0x10], r13
mov ecx, dword [rsp + 0x50]
mov r8d, dword [r15 + 8]
add rcx, rax
mov rdx, qword [r15]
call fcn.1400077a0
mov ecx, dword [r15 + 8]
add ecx, dword [rsp + 0x50]
mov r8d, dword [rbx + 8]
add rcx, rsi
mov rdx, qword [rbx]
call fcn.1400077a0
mov rcx, qword [0x1400f6ef8]
lea r9, [rsp + 0x58]
mov dword [rsp + 0x30], r13d
lea r8, str.RSAPUBLICBLOB
mov dword [rsp + 0x28], ebp
xor edx, edx
mov qword [rsp + 0x20], rsi
mov dword [rsp + 0x50], r13d
call sub.bcrypt.dll_BCryptImportKeyPair
mov ebx, eax
test eax, eax
js 0x1400aa529
mov r8d, dword [rdi + 8]
lea rax, [rsp + 0x90]
mov rdx, qword [rdi]
xor r9d, r9d
mov rcx, qword [rsp + 0x58]
mov dword [rsp + 0x48], 1
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x38], r13d
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], r13d
mov qword [rsp + 0x20], r13
call sub.bcrypt.dll_BCryptEncrypt
mov ebx, eax
test eax, eax
js 0x1400aa51f
mov edx, dword [rsp + 0x90]
mov rcx, r14
call fcn.1400aa290
test eax, eax
jne 0x1400aa51a
mov ecx, dword [rsp + 0x90]
cmp dword [rdi + 8], ecx
cmova ecx, dword [rdi + 8]
mov dword [rsp + 0x90], ecx
call fcn.140036114
mov rbp, rax
test rax, rax
je 0x1400aa51a
mov r9d, dword [rdi + 8]
mov rcx, rax
mov r8, qword [rdi]
mov edx, dword [rsp + 0x90]
call fcn.1400a97c0
mov ecx, dword [r14 + 8]
lea rax, [rsp + 0x50]
mov r8d, dword [rsp + 0x90]
xor r9d, r9d
mov dword [rsp + 0x48], 1
mov rdx, rbp
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x38], ecx
mov rcx, qword [r14]
mov qword [rsp + 0x30], rcx
mov rcx, qword [rsp + 0x58]
mov dword [rsp + 0x28], r13d
mov qword [rsp + 0x20], r13
call sub.bcrypt.dll_BCryptEncrypt
mov ecx, dword [rsp + 0x90]
mov ebx, eax
test rcx, rcx
je 0x1400aa500
mov rdi, rbp
xor eax, eax
rep stosb byte [rdi], al
mov rcx, rbp
call fcn.140011c70
test ebx, ebx
js 0x1400aa51f
mov edx, dword [rsp + 0x50]
mov rcx, r14
call fcn.1400aa290
jmp 0x1400aa51f
mov ebx, 0xc0000017
mov rcx, qword [rsp + 0x58]
call sub.bcrypt.dll_BCryptDestroyKey
mov r13, qword [rsp + 0x98]
test r12, r12
je 0x1400aa540
mov rdi, rsi
xor eax, eax
mov rcx, r12
rep stosb byte [rdi], al
mov rcx, rsi
call fcn.140011c70
sar ebx, 0x1f
mov eax, ebx
jmp 0x1400aa554
mov eax, 0xffffffff
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x40]
mov rbp, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret
Function at 0x1400aaa00
Capabilities:
Encode data using base64

Disassembly:
push rbx
push rsi
push rdi
push r14
push r15
sub rsp, 0x20
mov rbx, r8
mov qword [r9], 0
mov r15, r9
mov rdi, rdx
mov r8, rcx
mov rsi, 0xffffffffffffffff
test rbx, rbx
jne 0x1400aaa39
mov rbx, rsi
nop
inc rbx
cmp byte [rdx + rbx], 0
jne 0x1400aaa30
lea rcx, [rbx*4]
movabs rax, 0xaaaaaaaaaaaaaaab
mul rcx
mov rcx, rdx
mov rdx, r8
shr rcx, 1
add rcx, 4
call qword [rreloc.WS2_32.dll_htonl + 8]
mov r10, rax
mov r14, rax
test rax, rax
jne 0x1400aaa76
add rsp, 0x20
pop r15
pop r14
pop rdi
pop rsi
pop rbx
ret
mov qword [rsp + 0x58], rbp
mov qword [rsp + 0x60], r12
test rbx, rbx
je 0x1400aab5b
lea r12, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
xor edx, edx
xor eax, eax
test rbx, rbx
je 0x1400aaaa6
movzx ecx, byte [rdi]
inc edx
inc rdi
dec rbx
jmp 0x1400aaab2
cmp rax, 3
jae 0x1400aab85
xor cl, cl
mov byte [rsp + rax + 0x50], cl
inc rax
cmp rax, 3
jl 0x1400aaa94
movzx r11d, byte [rsp + 0x50]
movzx ecx, byte [rsp + 0x51]
movzx ebp, r11b
movzx r8d, byte [rsp + 0x52]
movzx eax, cl
shr al, 4
and r11b, 3
and cl, 0xf
shl r11b, 4
or r11b, al
shl cl, 2
movzx eax, r8b
shr bpl, 2
shr al, 6
and r8b, 0x3f
or cl, al
sub edx, 1
je 0x1400aab26
cmp edx, 1
je 0x1400aab19
movzx eax, r8b
movzx r8d, byte [rax + r12]
movzx eax, cl
movzx r9d, byte [rax + r12]
jmp 0x1400aab2d
movzx eax, cl
mov r8b, 0x3d
movzx r9d, byte [rax + r12]
jmp 0x1400aab2d
mov r8b, 0x3d
movzx r9d, r8b
movzx eax, bpl
movzx edx, byte [rax + r12]
movzx eax, r11b
movzx ecx, byte [rax + r12]
mov byte [r10], dl
mov byte [r10 + 1], cl
mov byte [r10 + 2], r9b
mov byte [r10 + 3], r8b
add r10, 4
test rbx, rbx
jne 0x1400aaa90
mov byte [r10], 0
mov qword [r15], r14
inc rsi
cmp byte [r14 + rsi], 0
jne 0x1400aab62
mov rbp, qword [rsp + 0x58]
mov rax, rsi
mov r12, qword [rsp + 0x60]
add rsp, 0x20
pop r15
pop r14
pop rdi
pop rsi
pop rbx
ret
call fcn.1400484d4
int3

Function at 0x1400ab220
Capabilities:
Encode data using xor

Disassembly:
xor r10d, r10d
test r9, r9
je 0x1400ab2f4
cmp r9, 0x40
jb 0x1400ab2d7
lea r11, [rcx - 1]
lea rax, [r8 - 1]
add r11, r9
add rax, r9
cmp rcx, rax
ja 0x1400ab252
cmp r11, r8
jae 0x1400ab2d7
lea rax, [rdx - 1]
add rax, r9
cmp rcx, rax
ja 0x1400ab263
cmp r11, rdx
jae 0x1400ab2d7
mov rax, r9
and rax, 0xffffffffffffffc0
nop word [rax + rax]
movdqu xmm0, xmmword [r8]
add r10, 0x40
movdqu xmm1, xmmword [rdx]
pxor xmm1, xmm0
movdqu xmm0, xmmword [r8 + 0x10]
movdqu xmmword [rcx], xmm1
movdqu xmm1, xmmword [rdx + 0x10]
pxor xmm1, xmm0
movdqu xmm0, xmmword [r8 + 0x20]
movdqu xmmword [rcx + 0x10], xmm1
movdqu xmm1, xmmword [rdx + 0x20]
pxor xmm1, xmm0
movdqu xmm0, xmmword [r8 + 0x30]
add r8, 0x40
movdqu xmmword [rcx + 0x20], xmm1
movdqu xmm1, xmmword [rdx + 0x30]
add rdx, 0x40
pxor xmm1, xmm0
movdqu xmmword [rcx + 0x30], xmm1
add rcx, 0x40
cmp r10, rax
jb 0x1400ab270
cmp r10, r9
jae 0x1400ab2f4
sub rdx, rcx
sub r8, rcx
sub r9, r10
movzx eax, byte [r8 + rcx]
xor al, byte [rdx + rcx]
mov byte [rcx], al
lea rcx, [rcx + 1]
sub r9, 1
jne 0x1400ab2e0
ret
Function at 0x1400bb1e0
Capabilities:
Get disk information

Disassembly:
push rbx
sub rsp, 0x30
mov rax, qword [0x1400f4640]
xor rax, rsp
mov qword [rsp + 0x28], rax
cmp ecx, 0x1a
jbe 0x1400bb22a
call fcn.1400263c4
mov dword [rax], reloc.WS2_32.dll_ntohs
call fcn.1400263a4
mov dword [rax], reloc.WS2_32.dll_listen
call fcn.140022608
xor eax, eax
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.140035d80
add rsp, 0x30
pop rbx
ret
xor ebx, ebx
test ecx, ecx
jne 0x1400bb235
lea eax, [rbx + 1]
jmp 0x1400bb217
add cx, 0x40
mov dword [rsp + 0x22], 0x5c003a
mov word [rsp + 0x20], cx
lea rcx, [rsp + 0x20]
mov word [rsp + 0x26], bx
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
test eax, eax
je 0x1400bb215
cmp eax, 1
setne bl
mov eax, ebx
jmp 0x1400bb217

Function at 0x1400bfd54
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 0x1400bfd84
xor eax, eax
jmp 0x1400bfe47
mov rbp, rbx
cmp word [rax], si
je 0x1400bfda9
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x1400bfd90
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x1400bfd8c
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.1400459b0
movsxd r14, eax
test eax, eax
jne 0x1400bfde7
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x1400bfd7d
mov rcx, r14
call fcn.140022aa8
mov rdi, rax
test rax, rax
jne 0x1400bfe00
xor ecx, ecx
call fcn.140022a6c
jmp 0x1400bfddc
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.1400459b0
test eax, eax
jne 0x1400bfe31
mov rcx, rdi
call fcn.140022a6c
jmp 0x1400bfe3b
xor ecx, ecx
call fcn.140022a6c
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 0x1400bfe64
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebp, ebp
mov rbx, rax
test rax, rax
je 0x1400bfeeb
mov rsi, rbx
cmp word [rax], bp
je 0x1400bfeaa
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x1400bfe94
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x1400bfe90
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.140022aa8
mov rdi, rax
test rax, rax
je 0x1400bfed8
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.1400077a0
mov rbp, rdi
xor ecx, ecx
call fcn.140022a6c
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x1400c07b0
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push r14
push r15
sub rsp, 0x20
mov eax, dword [rcx + 0x18]
mov rbp, rcx
mov ecx, dword [rcx + 0x20]
mov r14, rdx
add rcx, 0x18
mov r15d, r8d
lea r9d, [rax + rax]
add rcx, r9
call qword [fcn.140036114]
mov rbx, rax
test rax, rax
jne 0x1400c07f5
mov rbx, qword [rsp + 0x58]
add rsp, 0x20
pop r15
pop r14
pop rbp
ret
lea rcx, [rax + 0x18]
mov qword [rax], rbp
mov qword [rax + 8], rcx
mov eax, dword [rbp + 0x18]
add rax, rcx
mov qword [rsp + 0x48], rsi
mov qword [rbx + 0x10], rax
mov qword [rsp + 0x50], rdi
cmp r15d, dword [rbp + 0x1c]
jbe 0x1400c0840
call qword [rbp]
mov rcx, qword [rbx + 8]
mov r8d, r15d
mov rdx, r14
call qword [rbp + reloc.WS2_32.dll_htonl]
mov r14d, dword [rbp + 0x18]
add r14, qword [rbx + 0x10]
mov rdx, qword [rbx + 8]
mov rcx, r14
call qword [rbp + reloc.WS2_32.dll_recv]
mov r15d, dword [rbp + 0x20]
mov rcx, qword [rbx + 8]
call qword [rbp]
mov rcx, qword [rbx + 0x10]
call qword [rbp]
xor esi, esi
test r15, r15
je 0x1400c08a2
mov rsi, r15
nop dword [rax + rax]
movzx eax, byte [r14]
lea rdx, [rsp + 0x40]
xor al, 0x36
mov r8d, 1
mov byte [rsp + 0x40], al
mov rcx, qword [rbx + 8]
call qword [rbp + reloc.WS2_32.dll_htonl]
movzx eax, byte [r14]
lea rdx, [rsp + 0x40]
xor al, 0x5c
lea r14, [r14 + 1]
mov byte [rsp + 0x40], al
mov r8d, 1
mov rcx, qword [rbx + 0x10]
call qword [rbp + reloc.WS2_32.dll_htonl]
sub r15, 1
jne 0x1400c0860
mov eax, dword [rbp + 0x1c]
cmp rsi, rax
jae 0x1400c08e3
nop word [rax + rax]
mov rcx, qword [rbx + 8]
lea rdx, [0x1400d4a08]
mov r8d, 1
call qword [rbp + reloc.WS2_32.dll_htonl]
mov rcx, qword [rbx + 0x10]
lea rdx, [0x1400d4a09]
mov r8d, 1
call qword [rbp + reloc.WS2_32.dll_htonl]
mov eax, dword [rbp + 0x1c]
inc rsi
cmp rsi, rax
jb 0x1400c08b0
mov rdi, qword [rsp + 0x50]
mov rax, rbx
mov rbx, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop r15
pop r14
pop rbp
ret
Function at 0x1400c096c
Capabilities:
Set environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
xor r15d, r15d
mov r14, rdx
mov rsi, rcx
mov qword [rbp + 0x17], r15
xor edx, edx
mov qword [rbp + 0x1f], r15
lea rcx, [rbp - 0x39]
mov qword [rbp + 0x27], r15
mov qword [rbp + 0x2f], r15
mov edi, r15d
mov qword [rbp + 0x37], r15
mov byte [rbp + 0x3f], r15b
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], r15
mov qword [rbp - 1], r15
mov qword [rbp + 7], r15
mov byte [rbp + 0xf], r15b
call fcn.14001d77c
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x1400c09f6
cmp byte [rbp - 0x21], r15b
je 0x1400c09f1
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x1400c0a2c
call fcn.140023bd0
test eax, eax
jne 0x1400c0a18
cmp byte [rbp - 0x21], r15b
je 0x1400c0a10
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x1400c0a2c
cmp byte [rbp - 0x21], r15b
je 0x1400c0a29
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, r15d
lea r8, [rbp + 0x77]
mov rcx, rsi
lea rdx, [rbp + 0x17]
call fcn.14007004c
test eax, eax
jne 0x1400c0acc
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.14001d77c
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x1400c0a6b
cmp byte [rbp - 0x21], r15b
je 0x1400c0aa0
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x1400c0aa0
call fcn.140023bd0
test eax, eax
jne 0x1400c0a8c
cmp byte [rbp - 0x21], r15b
je 0x1400c0a85
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x1400c0aa0
cmp byte [rbp - 0x21], r15b
je 0x1400c0a9d
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, r15d
mov r9d, ebx
lea r8, [rbp + 0x77]
lea rdx, [rbp - 0x19]
mov rcx, r14
call fcn.14007004c
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x1400c0acc
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x1400c0acf
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x1400c0add
mov rcx, rdi
call fcn.140022a6c
cmp byte [rbp + 0x3f], r15b
je 0x1400c0aec
mov rcx, qword [rbp + 0x27]
call fcn.140022a6c
lea r11, [rsp + 0xa0]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
Function at 0x1401020f4
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x48
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x30], rcx
call sub.KERNEL32.dll_GetLastError
mov qword [rsp + 0x38], rax
mov rcx, qword [0x1400f4208]
call sub.KERNEL32.dll_TlsGetValue
mov rcx, qword [rsp + 0x30]
mov qword [rax + 0x10], rcx
mov rcx, qword [rsp + 0x38]
call sub.KERNEL32.dll_SetLastError
mov rax, qword [rsp + 0x28]
add rsp, 0x48
ret
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x140025410]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x140025420]
mov dword [rax], 1
mov rax, qword [0x140025430]
mov dword [rax], 1
mov rax, qword [0x1400253d0]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x140025400]
mov dword [0x14002800c], ecx
mov eax, dword [rax]
test eax, eax
je 0x1400010b0
mov ecx, 2
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x1400254e0]
mov edx, dword [rdx]
mov dword [rax], edx
call sym.__p__commode
mov rdx, qword [0x1400254c0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x140025380]
cmp dword [rax], 1
je 0x1400010f8
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x140001077
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001110
cmp dx, 0x20b
jne 0x14000105a
cmp dword [rax + 0x84], 0xe
jbe 0x14000105a
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x14000105a
mov rcx, qword [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x14000105a
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x14000105a
Function at 0x140001180
Capabilities:
Terminate process

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rbx, qword [0x140025460]
mov rbp, qword [sym.imp.KERNEL32.dll_Sleep]
xor edi, edi
mov rax, qword gs:[0x30]
mov rsi, qword [rax + 8]
jmp 0x1400011c0
cmp rsi, rax
je 0x140001320
mov ecx, 0x3e8
call rbp
mov rax, rdi
lock cmpxchg qword [rbx], rsi
test rax, rax
jne 0x1400011b0
mov rsi, qword [0x140025470]
xor edi, edi
mov eax, dword [rsi]
cmp eax, 1
je 0x140001337
mov eax, dword [rsi]
test eax, eax
je 0x1400013a0
mov dword [0x140028008], 1
mov eax, dword [rsi]
cmp eax, 1
je 0x14000134c
test edi, edi
je 0x14000136d
mov rax, qword [0x1400253c0]
mov rax, qword [rax]
test rax, rax
je 0x140001223
xor r8d, r8d
mov edx, 2
xor ecx, ecx
call rax
call dbg._pei386_runtime_relocator
mov rcx, qword [dbg._gnu_exception_handler]
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rdx, qword [0x140025450]
lea rcx, [dbg.__mingw_invalidParameterHandler]
mov qword [rdx], rax
call sym._set_invalid_parameter_handler
call dbg._fpreset
mov ebx, dword [0x140028028]
lea edi, [rbx + 1]
movsxd rdi, edi
shl rdi, 3
mov rcx, rdi
call sym.malloc
mov r12, qword [0x140028020]
mov rbp, rax
test ebx, ebx
jle 0x1400013c0
sub rdi, 8
xor ebx, ebx
mov rcx, qword [r12 + rbx]
call sym.strlen
lea rsi, [rax + 1]
mov rcx, rsi
call sym.malloc
mov r8, rsi
mov qword [rbp + rbx], rax
mov rdx, qword [r12 + rbx]
mov rcx, rax
add rbx, 8
call sym.memcpy
cmp rdi, rbx
jne 0x140001280
add rdi, rbp
mov qword [rdi], 0
mov qword [0x140028020], rbp
call dbg.__main
mov rax, qword [0x1400253e0]
mov r8, qword [0x140028018]
mov ecx, dword [0x140028028]
mov rax, qword [rax]
mov qword [rax], r8
mov rdx, qword [0x140028020]
call sym.main
mov ecx, dword [0x14002800c]
mov dword [0x140028010], eax
test ecx, ecx
je 0x1400013c8
mov edx, dword [0x140028008]
test edx, edx
je 0x140001380
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rsi, qword [0x140025470]
mov edi, 1
mov eax, dword [rsi]
cmp eax, 1
jne 0x1400011e1
mov ecx, 0x1f
call dbg._amsg_exit
mov eax, dword [rsi]
cmp eax, 1
jne 0x140001200
mov rdx, qword [0x140025490]
mov rcx, qword [0x140025480]
call sym._initterm
mov dword [rsi], 2
test edi, edi
jne 0x140001208
xor eax, eax
xchg qword [rbx], rax
jmp 0x140001208
call sym._cexit
mov eax, dword [0x140028010]
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rdx, qword [0x1400254b0]
mov rcx, qword [0x1400254a0]
mov dword [rsi], 1
call sym._initterm
jmp 0x1400011f5
mov rdi, rax
jmp 0x1400012b5
mov ecx, eax
call sym.exit
nop

Function at 0x140001730
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, 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 sym.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call sym.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call dbg.vfprintf
call sym.abort
nop
nop dword [rax]
Function at 0x1400017a0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140028094]
mov rbx, rcx
test esi, esi
jle 0x1400018d0
mov rax, qword [0x140028098]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x1400017eb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140001875
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x1400017d0
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x1400018f2
mov rax, qword [0x140028098]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call dbg._GetPEImageBase
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x140028098]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x1400018d7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14000186e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140001880
add dword [0x140028094], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x140028098]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14000186e
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 esi, esi
jmp 0x1400017f8
mov rax, qword [0x140028098]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call dbg.__report_error
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140001e60
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140028100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400280e0]
test rbx, rbx
je 0x140001ebc
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x140001eb3
test rsi, rsi
je 0x140001eb3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140001e98
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x1400020d0
Capabilities:
Parse pe header

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