joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14000ce90
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rsi
push rdi
push r12
sub rsp, 0x30
lea r12, [0x14001e940]
xor esi, esi
mov edi, ecx
mov rax, r12
mov ebx, esi
nop
cmp ecx, dword [rax]
je 0x14000cece
add ebx, 1
add rax, 0x10
cmp ebx, 0x17
jb 0x14000ceb0
mov rbx, qword [rsp + 0x60]
add rsp, 0x30
pop r12
pop rdi
pop rsi
ret
cmp ebx, 0x17
jae 0x14000d0b5
mov ecx, 3
call fcn.140014980
cmp eax, 1
je 0x14000d06c
mov ecx, 3
call fcn.140014980
test eax, eax
jne 0x14000cf05
cmp dword [0x14001e0c0], 1
je 0x14000d06c
cmp edi, 0xfc
je 0x14000d0b5
mov qword [rsp + 0x50], rbp
lea rbp, [0x14001fce0]
lea r8, str.Runtime_Error__n_nProgram:
mov rcx, rbp
mov edx, 0x314
call fcn.14000b160
test eax, eax
je 0x14000cf49
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rsi
call fcn.14000a920
lea rdx, [0x14001fcf9]
mov r8d, 0x104
xor ecx, ecx
mov byte [0x14001fdfd], sil
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x14000cf99
lea r8, str._program_name_unknown_
lea rcx, [0x14001fcf9]
mov edx, 0x2fb
call fcn.14000b160
test eax, eax
je 0x14000cf99
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rsi
call fcn.14000a920
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdi, [0x14001fcf9]
repne scasb al, byte [rdi]
not rcx
cmp rcx, 0x3c
jbe 0x14000cfe8
lea rcx, [rcx + rbp - 0x23]
lea rdx, [0x14001fff4]
lea r9d, [rax + 3]
lea r8, [0x140017e14]
sub rdx, rcx
call fcn.140013da0
test eax, eax
je 0x14000cfe8
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rsi
call fcn.14000a920
lea r8, [0x140017e10]
mov edx, 0x314
mov rcx, rbp
call fcn.140013ce0
test eax, eax
je 0x14000d014
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rsi
call fcn.14000a920
movsxd r8, ebx
mov edx, 0x314
mov rcx, rbp
add r8, r8
mov r8, qword [r12 + r8*8 + 8]
call fcn.140013ce0
test eax, eax
je 0x14000d044
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rsi
call fcn.14000a920
lea rdx, str.Microsoft_Visual_C_Runtime_Library
mov r8d, 0x12010
mov rcx, rbp
call fcn.140014720
mov rbp, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x60]
add rsp, 0x30
pop r12
pop rdi
pop rsi
ret
mov ecx, 0xfffffff4
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
test rax, rax
mov r11, rax
je 0x14000d0b5
cmp rax, 0xffffffffffffffff
je 0x14000d0b5
xor eax, eax
movsxd rcx, ebx
lea r9, [rsp + 0x58]
add rcx, rcx
mov qword [rsp + 0x20], rsi
mov rdx, qword [r12 + rcx*8 + 8]
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
mov rcx, r11
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rbx, qword [rsp + 0x60]
add rsp, 0x30
pop r12
pop rdi
pop rsi
ret
Function at 0x14000d0d0
Capabilities:
Write file on windows

Disassembly:
sub rsp, 0x38
mov ecx, 3
call fcn.140014980
cmp eax, 1
je 0x14000d102
mov ecx, 3
call fcn.140014980
test eax, eax
jne 0x14000d1b6
cmp dword [0x14001e0c0], 1
jne 0x14000d1b6
mov qword [rsp + 0x48], rbx
lea rbx, [0x14001e940]
mov qword [rsp + 0x30], rdi
mov rax, rbx
xor edi, edi
cmp dword [rax], 0xfc
je 0x14000d12e
add edi, 1
add rax, 0x10
cmp edi, 0x17
jb 0x14000d118
jmp 0x14000d1a2
cmp edi, 0x17
jae 0x14000d1a2
mov ecx, 3
call fcn.140014980
cmp eax, 1
je 0x14000d159
mov ecx, 3
call fcn.140014980
test eax, eax
jne 0x14000d1a2
cmp dword [0x14001e0c0], 1
jne 0x14000d1a2
mov ecx, 0xfffffff4
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
xor al, 0xa1
add byte [rax], al
Function at 0x14000e280
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
sub rsp, 0x30
mov eax, dword [0x14002021c]
xor r12d, r12d
test eax, eax
mov ebp, r12d
jne 0x14000e2dc
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test rax, rax
mov rdi, rax
je 0x14000e2bc
mov dword [0x14002021c], 1
jmp 0x14000e2ef
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x14000e2d6
mov dword [0x14002021c], 2
jmp 0x14000e359
mov eax, dword [0x14002021c]
cmp eax, 1
jne 0x14000e350
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test rax, rax
mov rdi, rax
je 0x14000e32a
cmp word [rdi], bp
mov rax, rdi
je 0x14000e309
add rax, 2
cmp word [rax], bp
jne 0x14000e2f7
add rax, 2
cmp word [rax], bp
jne 0x14000e2f7
sub eax, edi
add eax, 2
movsxd rsi, eax
mov rcx, rsi
call fcn.1400104b0
test rax, rax
mov rbx, rax
jne 0x14000e331
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x14000e44b
mov r8, rsi
mov rdx, rdi
mov rcx, rax
call fcn.140009320
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbx
jmp 0x14000e44b
cmp eax, 2
je 0x14000e359
test eax, eax
jne 0x14000e32a
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
test rax, rax
mov rsi, rax
je 0x14000e32a
cmp byte [rax], bpl
mov rbx, rax
je 0x14000e3a8
nop
or r9d, 0xffffffff
mov r8, rbx
xor ecx, ecx
lea edx, [r9 + 2]
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x14000e32a
or rcx, 0xffffffffffffffff
add ebp, eax
mov rdi, rbx
xor eax, eax
repne scasb al, byte [rdi]
not rcx
add rbx, rcx
cmp byte [rbx], al
jne 0x14000e370
add ebp, 1
mov edx, 2
movsxd rcx, ebp
call fcn.140010520
test rax, rax
mov r12, rax
jne 0x14000e3cd
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
jmp 0x14000e44b
cmp byte [rsi], 0
mov qword [rsp + 0x50], r13
mov rbx, rax
mov r13, rsi
je 0x14000e435
nop
or r9d, 0xffffffff
mov eax, ebp
mov rcx, rbx
sub rcx, r12
lea edx, [r9 + 2]
mov r8, r13
sar rcx, 1
sub eax, ecx
xor ecx, ecx
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x14000e45e
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, r13
repne scasb al, byte [rdi]
mov rdi, rbx
not rcx
add r13, rcx
or rcx, 0xffffffffffffffff
repne scasw ax, word [rdi]
cmp byte [r13], al
not rcx
lea rbx, [rbx + rcx*2]
jne 0x14000e3e0
mov rcx, rsi
mov word [rbx], 0
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov rax, r12
mov r13, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x60]
add rsp, 0x30
pop r12
pop rdi
pop rsi
ret
mov rcx, r12
call fcn.1400092c0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
jmp 0x14000e446
Function at 0x140014720
Capabilities:
Link many functions at runtime

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r13
push r14
sub rsp, 0x50
mov edi, r8d
mov r13, rdx
mov r14, rcx
call fcn.14000c1a0
xor ebx, ebx
cmp qword [0x140020540], rbx
mov rbp, rax
mov dword [rsp + 0x98], ebx
mov dword [rsp + 0x30], ebx
jne 0x14001484c
lea rcx, str.USER32.DLL
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
test rax, rax
mov rsi, rax
je 0x14001495f
lea rdx, str.MessageBoxA
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x14001495f
mov rcx, rax
call fcn.14000c0d0
lea rdx, str.GetActiveWindow
mov rcx, rsi
mov qword [0x140020540], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call fcn.14000c0d0
lea rdx, str.GetLastActivePopup
mov rcx, rsi
mov qword [0x140020548], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call fcn.14000c0d0
lea rcx, [rsp + 0x98]
mov qword [0x140020550], rax
call fcn.14000cb30
test eax, eax
je 0x1400147ff
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rbx
call fcn.14000a920
cmp dword [rsp + 0x98], 2
jne 0x14001484c
lea rdx, str.GetUserObjectInformationA
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call fcn.14000c0d0
test rax, rax
mov qword [0x140020560], rax
je 0x14001484c
lea rdx, str.GetProcessWindowStation
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call fcn.14000c0d0
mov qword [0x140020558], rax
mov rcx, qword [0x140020558]
mov qword [rsp + 0x80], r12
cmp rcx, rbp
je 0x1400148f8
cmp qword [0x140020560], rbp
je 0x1400148f8
call fcn.14000c290
mov rcx, qword [0x140020560]
mov rsi, rax
call fcn.14000c290
test rsi, rsi
mov r12, rax
je 0x1400148f8
test rax, rax
je 0x1400148f8
call rsi
test rax, rax
je 0x1400148c3
lea rcx, [rsp + 0x34]
mov r9d, 0xc
lea r8, [rsp + 0x38]
mov qword [rsp + 0x20], rcx
lea edx, [r9 - 0xb]
mov rcx, rax
call r12
test eax, eax
je 0x1400148c3
test byte [rsp + 0x40], 1
jne 0x1400148f8
lea rcx, [rsp + 0x30]
call fcn.14000cb80
test eax, eax
je 0x1400148e5
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rbx
call fcn.14000a920
cmp dword [rsp + 0x30], 4
jb 0x1400148f2
bts edi, 0x15
jmp 0x140014936
bts edi, 0x12
jmp 0x140014936
mov rcx, qword [0x140020548]
cmp rcx, rbp
je 0x140014936
call fcn.14000c290
test rax, rax
je 0x140014936
call rax
test rax, rax
mov rbx, rax
je 0x140014936
mov rcx, qword [0x140020550]
cmp rcx, rbp
je 0x140014936
call fcn.14000c290
test rax, rax
je 0x140014936
mov rcx, rbx
call rax
mov rbx, rax
mov rcx, qword [0x140020540]
call fcn.14000c290
mov r12, qword [rsp + 0x80]
test rax, rax
je 0x14001495f
mov r9d, edi
mov r8, r13
mov rdx, r14
mov rcx, rbx
call rax
jmp 0x140014961
xor eax, eax
mov rbx, qword [rsp + 0x88]
add rsp, 0x50
pop r14
pop r13
pop rdi
pop rsi
pop rbp
ret
Function at 0x1400149e0
Capabilities:
Get geographical location

Disassembly:
sub rsp, 0x38
mov rax, qword [0x14001e0c8]
xor rax, rsp
mov qword [rsp + 0x28], rax
lea r8, [rsp + 0x20]
mov r9d, 6
mov edx, 0x1004
mov byte [rsp + 0x26], 0
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
jne 0x140014a27
or eax, 0xffffffff
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.1400089d0
add rsp, 0x38
ret
lea rcx, [rsp + 0x20]
call fcn.140015bc0
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.1400089d0
add rsp, 0x38
ret
Function at 0x14000fe20
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x80
mov rbx, r8
mov edi, edx
test r8, r8
je 0x14000fff0
mov rax, qword [rcx]
call qword [rax]
mov rbp, rax
test edi, edi
je 0x14000fe90
cmp edi, 3
je 0x14000fe90
sub edi, 1
je 0x14000fe7f
cmp edi, 1
jne 0x14000fff0
movzx edx, bx
mov rcx, rax
call qword [sym.imp.USER32.dll_LoadIconW]
jmp 0x14000fff2
movzx edx, bx
mov rcx, rbp
call qword [sym.imp.USER32.dll_LoadCursorW]
jmp 0x14000fff2
movzx edx, bx
mov r8d, 0xa
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov r15, rax
test rax, rax
je 0x14000fff0
xor ebx, ebx
mov esi, ebx
mov rdx, rax
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov r14, rax
test rax, rax
je 0x14000fff0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov r12, rax
test rax, rax
je 0x14000ff56
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x50], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x60], xmm1
mov qword [rsp + 0x70], rbx
mov rdx, r15
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov r8d, eax
mov rdx, r12
lea rcx, [rsp + 0x50]
call fcn.14000dac0
test rax, rax
je 0x14000ff2f
mov rsi, qword [rsp + 0x50]
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x50], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x60], xmm1
mov qword [rsp + 0x70], rbx
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x14000ff56
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x50], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x60], xmm1
mov qword [rsp + 0x70], rbx
call qword [sym.imp.GDI32.dll_DeleteObject]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_FreeResource]
test rsi, rsi
je 0x14000fff0
cmp edi, 3
jne 0x14000ffeb
lea r8, [rsp + 0x30]
lea edx, [rdi + 0x1d]
mov rcx, rsi
call qword [sym.imp.GDI32.dll_GetObjectW]
test eax, eax
je 0x14000ffdd
mov edx, dword [rsp + 0x38]
test edx, edx
je 0x14000ffdd
lea ecx, [rdx + 1]
and ecx, 0xfffffffe
mov dword [rsp + 0x20], 1
xor r9d, r9d
lea r8d, [rdi + 0x1e]
call qword [sym.imp.COMCTL32.dll_ImageList_Create]
mov rdi, rax
test rax, rax
je 0x14000ffdd
mov r8d, 0xff00ff
mov rdx, rsi
mov rcx, rax
call qword [sym.imp.COMCTL32.dll_ImageList_AddMasked]
test eax, eax
jns 0x14000ffda
mov rcx, rdi
call qword [sym.imp.COMCTL32.dll_ImageList_Destroy]
mov rcx, rsi
call qword [sym.imp.GDI32.dll_DeleteObject]
mov rax, rbx
jmp 0x14000fff2
mov rbx, rdi
mov rcx, rsi
call qword [sym.imp.GDI32.dll_DeleteObject]
mov rax, rbx
jmp 0x14000fff2
mov rax, rsi
jmp 0x14000fff2
xor eax, eax
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r12
ret
Function at 0x1400100b0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push r14
sub rsp, 0x20
xor esi, esi
mov r14, r9
mov qword [r8 + 0x28], rsi
mov rbx, r8
mov rbp, rdx
test rdx, rdx
jne 0x1400100e2
lea eax, [rdx + 1]
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rsi
pop rbp
ret
mov rax, qword [rcx]
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x48], r15
call qword [rax]
movzx edx, bp
mov r8, r14
mov rcx, rax
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov r15, rax
test rax, rax
je 0x1400101d7
mov rdx, rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rbp, rax
test rax, rax
je 0x1400101d7
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov r14, rax
test rax, rax
je 0x1400101ce
mov rdx, r15
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
mov qword [rbx + 0x28], rsi
cmp qword [rbx + 0x20], rdi
jl 0x1400101ac
cmp rdi, 1
jne 0x14001016a
movzx ecx, byte [r14]
mov rax, qword [rbx + 0x18]
mov byte [rax], cl
inc qword [rbx + 0x28]
jmp 0x1400101c9
cmp rdi, 2
jne 0x140010181
movzx ecx, word [r14]
mov rax, qword [rbx + 0x18]
mov word [rax], cx
add qword [rbx + 0x28], rdi
jmp 0x1400101c9
cmp rdi, 4
jne 0x140010196
mov ecx, dword [r14]
mov rax, qword [rbx + 0x18]
mov dword [rax], ecx
add qword [rbx + 0x28], rdi
jmp 0x1400101c9
cmp rdi, 8
jne 0x1400101ac
mov rcx, qword [r14]
mov rax, qword [rbx + 0x18]
mov qword [rax], rcx
add qword [rbx + 0x28], rdi
jmp 0x1400101c9
test eax, eax
je 0x1400101c9
mov rdx, rdi
mov rcx, rbx
call fcn.140011260
mov r8, rdi
mov rdx, r14
mov rcx, rax
call fcn.140018210
mov esi, 1
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_FreeResource]
mov r15, qword [rsp + 0x48]
mov rax, rsi
mov rdi, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rsi
pop rbp
ret

Function at 0x1400190bc
Capabilities:
Parse pe header

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov ebx, ecx
test r8d, r8d
jne 0x140018f1b
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140018f1b
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140018f1b
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140018f1b
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140018f1b
cmp dword [rcx + 0x84], 0xe
jbe 0x140018f1b
cmp dword [rcx + 0xf8], 0
je 0x140018f1b
mov ecx, ebx
call fcn.140018fd8
mov byte [rbp + 0x28], 0
lea rax, [rbp + 0x18]
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x20]
mov qword [rbp - 0x10], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov eax, 2
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
lea r9, [rbp - 0x2c]
lea r8, [rbp - 0x18]
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x30]
call fcn.140018da8
nop
cmp dword [rbp + 0x20], 0
je 0x140018f69
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.140018f74
int3
xor r8d, r8d
xor edx, edx
jmp 0x140018eac
Function at 0x140021e2c
Capabilities:
Read file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x30
movsxd rbp, ecx
mov r9, r8
mov rax, rbp
lea rcx, [0x14003ff60]
and eax, 0x3f
mov r10, rbp
sar r10, 6
xor edi, edi
mov rsi, rdx
mov r14, rbp
lea r8, [rax + rax*8]
mov rax, qword [rcx + r10*8]
mov ecx, 4
mov qword [rsp + 0x78], rcx
mov r11, qword [rax + r8*8 + 0x28]
lea r12d, [rcx + 6]
test r9, r9
je 0x140021e8a
cmp word [rdx], r12w
jne 0x140021e8a
or byte [rax + r8*8 + 0x38], cl
jmp 0x140021e90
and byte [rax + r8*8 + 0x38], 0xfb
lea rdx, [rdx + r9*2]
mov rcx, rsi
mov rbx, rsi
cmp rsi, rdx
jae 0x140021feb
mov r9d, 0x1a
lea r13d, [r9 - 0xd]
movzx eax, word [rcx]
cmp ax, r9w
je 0x140021fc6
lea r9, [rcx + 2]
cmp ax, r13w
je 0x140021ec9
mov rcx, r9
jmp 0x140021eec
cmp r9, rdx
jae 0x140021f03
cmp word [r9], r12w
mov eax, 2
cmove rax, qword [rsp + 0x78]
add rcx, rax
mov eax, r12d
cmp word [r9], r12w
cmovne ax, r13w
mov word [rbx], ax
mov r9d, 0x1a
add rbx, 2
cmp rcx, rdx
jb 0x140021ead
jmp 0x140021feb
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rdi
mov r8d, 2
lea rdx, [rsp + 0x70]
mov rcx, r11
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140021fc0
cmp dword [rsp + 0x80], edi
je 0x140021fc0
mov rdx, r14
lea r11, [0x14003ff60]
sar rdx, 6
and r14d, 0x3f
mov rax, qword [r11 + rdx*8]
lea r8, [r14 + r14*8]
test byte [rax + r8*8 + 0x38], 0x48
je 0x140021f99
movzx eax, word [rsp + 0x70]
cmp ax, r12w
jne 0x140021f6c
mov word [rbx], r12w
jmp 0x140021fe7
mov word [rbx], r13w
mov word [rsp + 0x78], ax
mov rax, qword [r11 + rdx*8]
lea rcx, [rax + r8*8]
mov al, byte [rsp + rdi + 0x78]
mov byte [rcx + rdi + 0x3a], al
inc rdi
cmp rdi, 2
jl 0x140021f75
mov rax, qword [r11 + rdx*8]
mov byte [rax + r8*8 + 0x3c], r12b
jmp 0x140021fe7
cmp word [rsp + 0x70], r12w
jne 0x140021fa6
cmp rbx, rsi
je 0x140021f66
mov rdx, 0xfffffffffffffffe
mov ecx, ebp
lea r8d, [rdx + 3]
call fcn.14001f524
cmp word [rsp + 0x70], r12w
je 0x140021feb
mov word [rbx], r13w
jmp 0x140021fe7
lea r11, [0x14003ff60]
mov rcx, qword [r11 + r10*8]
mov al, byte [rcx + r8*8 + 0x38]
test al, 0x40
jne 0x140021fe3
or al, 2
mov byte [rcx + r8*8 + 0x38], al
jmp 0x140021feb
mov word [rbx], r9w
add rbx, 2
sub rbx, rsi
sar rbx, 1
lea eax, [rbx + rbx]
add rsp, 0x30
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x140023e88
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 0x140023f0f
mov rsi, rbx
cmp word [rax], bp
je 0x140023ece
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x140023eb8
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x140023eb4
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.1400208ac
mov rdi, rax
test rax, rax
je 0x140023efc
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.140018210
mov rbp, rdi
xor ecx, ecx
call fcn.14001e90c
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 0x140028960
Capabilities:
Clear file content

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 r12
push r14
push r15
sub rsp, 0x20
mov rbx, rdx
mov rsi, r8
xor edx, edx
mov r14d, ecx
lea r8d, [rdx + 1]
call fcn.14001f524
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.14001f524
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x140028ab0
cmp rax, 0xffffffffffffffff
je 0x140028ab0
xor edi, edi
test rbp, rbp
jle 0x140028a5b
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.140022c38
mov rbx, rax
test rax, rax
jne 0x1400289e8
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x140028a51
mov edx, 0x8000
mov ecx, r14d
call fcn.14001db34
mov r15d, eax
mov eax, 0x1000
mov r8d, ebp
cmp rbp, rax
mov r9, rsi
mov rdx, rbx
mov ecx, r14d
cmovge r8d, eax
call fcn.140020218
cmp eax, 0xffffffff
je 0x140028a31
cdqe
sub rbp, rax
test rbp, rbp
jg 0x1400289f8
mov edx, r15d
mov ecx, r14d
call fcn.14001db34
jmp 0x140028a51
cmp byte [rsi + 0x38], dil
je 0x140028a48
cmp dword [rsi + 0x34], 5
jne 0x140028a48
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x140028a51
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.14001e90c
jmp 0x140028ac4
jns 0x140028ac4
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.14001f524
cmp rax, 0xffffffffffffffff
jne 0x140028a7c
cmp byte [rsi + 0x30], dil
je 0x140028ac4
mov edi, dword [rsi + 0x2c]
jmp 0x140028ac4
mov ecx, r14d
call fcn.140024980
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x140028ac4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, 0xd
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
jmp 0x140028ac4
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x140028abd
mov eax, dword [rsi + 0x2c]
jmp 0x140028ac2
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.14001f524
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret
Function at 0x2fc4c4ea0
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call fcn.2fc4c5f60
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
nop

Function at 0x2fc4c58a2
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x2fc4ea108]
test eax, eax
je 0x2fc4c593a
lea rax, [0x2fc4ea0e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x2fc4ea110]
mov qword [rbp - 8], rax
jmp 0x2fc4c591e
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x2fc4c5912
cmp qword [rbp - 0x10], 0
je 0x2fc4c5912
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x2fc4c58d8
lea rax, [0x2fc4ea0e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x2fc4c593b
nop
add rsp, 0x30
pop rbp
ret

Function at 0x2fc4c5a40
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x2fc4c5a68
mov eax, 0
jmp 0x2fc4c5ab6
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x2fc4c5a91
mov eax, 0
jmp 0x2fc4c5ab6
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x2fc4c5ab1
mov eax, 0
jmp 0x2fc4c5ab6
mov eax, 1
add rsp, 0x20
pop rbp
ret