joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140014920
Capabilities:
Copy file

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x30
mov rdi, rcx
lea rcx, str.DcLoadDriver:_Entering__n
call fcn.140016938
lea rcx, str.DcUnloadDriver:_Entering__n
call fcn.140016938
mov rcx, rdi
call fcn.1400145c0
mov ebx, eax
test eax, eax
jne 0x140014961
lea rcx, str.DcStopService_failed__n
call fcn.140016938
jmp 0x140014966
mov ebx, 1
lea rcx, str.DcUnloadDriver:_Exiting__n
call fcn.140016938
cmp ebx, 1
je 0x140014988
lea rcx, str.DcUnloadDriver_failed__n
call fcn.140016938
jmp 0x140014c7d
lea rcx, str.Going_to_GetDCAgentDirectory_n
mov qword [rsp + 0x40], rsi
call fcn.140016938
mov edx, 0x104
mov ecx, 1
add byte [rax], al
add al, ch
cmp byte [rbx], ah
add byte [rax], al
lea rcx, str.DcLoadDriver:_Exiting__n
call fcn.140016938
mov eax, ebx
mov rbx, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret

Function at 0x140014ca0
Capabilities:
Create service
Persist via windows service

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x70
mov rbx, rcx
lea rcx, str.DcCreateService:_Entering__n
xor edi, edi
call fcn.140016938
mov rcx, qword [0x140035f68]
mov qword [rsp + 0x60], rdi
mov qword [rsp + 0x58], rdi
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x40], rdi
lea rax, [0x140035f70]
mov r9d, 0xf01ff
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
mov r8, rbx
mov rdx, rbx
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], 2
call qword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
test rbx, rbx
jne 0x140014d36
cmp eax, 0x431
je 0x140014d36
lea rcx, str.CreateService_failed__last_error__d__n
mov edx, eax
call fcn.140016938
jmp 0x140014d49
mov edi, 1
test rbx, rbx
je 0x140014d49
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rcx, str.DcCreateService:_Exiting__n
call fcn.140016938
mov rbx, qword [rsp + 0x80]
mov eax, edi
add rsp, 0x70
pop rdi
ret

Function at 0x140014df0
Capabilities:
Start service

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rdx, rcx
mov rcx, qword [0x140035f68]
mov r8d, 0xf01ff
xor ebx, ebx
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov rdi, rax
test rax, rax
jne 0x140014e3b
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.DcStartService:_OpenService_failed__last_error__d__n
mov edx, eax
call fcn.140016938
mov eax, ebx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x140014e70
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
je 0x140014e70
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rdi
call fcn.140014ea0
mov ecx, 1
test eax, eax
cmovne ebx, ecx
Function at 0x140014ea0
Capabilities:
Query service status

Disassembly:
push rbx
sub rsp, 0x70
mov rax, qword [0x140033010]
xor rax, rsp
mov qword [rsp + 0x60], rax
mov rbx, rcx
nop dword [rax + rax]
lea rcx, str.TcWaitForServiceState:_Waiting_for_service__p_to_enter_state__u...__n
mov r8d, 4
mov rdx, rbx
call fcn.140016938
lea rax, [rsp + 0x30]
lea r8, [rsp + 0x38]
mov r9d, 0x24
xor edx, edx
mov rcx, rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x140014f25
cmp dword [rsp + 0x3c], 4
je 0x140014f0d
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x140014ec0
mov eax, 1
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.140015da0
add rsp, 0x70
pop rbx
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.TcGetServiceState:_QueryServiceStatusEx_failed__last_error_0x_x__n
mov edx, eax
call fcn.140016938
xor eax, eax
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.140015da0
add rsp, 0x70
pop rbx
ret
Function at 0x1400151d0
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x260
mov rax, qword [0x140033010]
xor rax, rsp
mov qword [rsp + 0x250], rax
mov edi, ecx
lea rcx, [rsp + 0x42]
xor esi, esi
xor edx, edx
mov r8d, 0x206
mov word [rsp + 0x40], si
call fcn.140017c10
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], rsi
xor r9d, r9d
mov r8d, edi
xor edx, edx
mov ecx, 0x1000
mov dword [rsp + 0x28], 0x104
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_FormatMessageW]
pop rsp
invalid
add dword [rax], eax
test eax, eax
jne 0x140015372
lea rcx, [rsp + 0x40]
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
dec eax
cmp eax, 0x103
ja 0x140015362
mov ecx, 0x104
lea rax, [rsp + 0x40]
mov r10d, esi
cmp word [rax], si
je 0x14001527f
add rax, 2
dec rcx
jne 0x140015266
mov r10d, 0x80070057
mov rdx, rsi
jmp 0x140015297
test rcx, rcx
jne 0x14001528f
mov r10d, 0x80070057
mov rdx, rsi
jmp 0x140015297
mov edx, 0x104
sub rdx, rcx
test r10d, r10d
js 0x1400152fd
lea rax, [rsp + 0x40]
mov ecx, 0x104
mov r10d, esi
lea rax, [rax + rdx*2]
sub rcx, rdx
je 0x1400152ed
add rdx, 0x7ffffefa
lea r9, str._fltlib.dll
add rdx, rcx
sub r9, rax
test rdx, rdx
je 0x1400152e8
movzx r8d, word [r9 + rax]
test r8w, r8w
je 0x1400152e8
mov word [rax], r8w
add rax, 2
dec rdx
dec rcx
jne 0x1400152c6
jmp 0x1400152ed
test rcx, rcx
jne 0x1400152f7
sub rax, 2
mov r10d, 0x8007007a
mov word [rax], si
test r10d, r10d
jne 0x140015362
xor edx, edx
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x278], rbx
lea r8d, [rdx + 2]
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov qword [rsp + 0x30], rsi
xor r9d, r9d
mov rbx, rax
lea rax, [rsp + 0x40]
mov r8d, edi
mov ecx, 0x800
mov rdx, rbx
mov dword [rsp + 0x28], 0x104
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_FormatMessageW]
mov esi, eax
test rbx, rbx
je 0x140015356
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rbx, qword [rsp + 0x278]
test esi, esi
jne 0x140015372
lea rcx, str._DisplayError__:_Could_not_translate_error:__d_n
mov edx, edi
call fcn.140016938
jmp 0x140015383
lea rdx, [rsp + 0x40]
lea rcx, str._DisplayError__:__ws_n
call fcn.140016938
mov rcx, qword [rsp + 0x250]
xor rcx, rsp
call fcn.140015da0
mov rsi, qword [rsp + 0x280]
add rsp, 0x260
pop rdi
ret
Function at 0x1400171c0
Capabilities:
Allocate or change rwx memory

Disassembly:
mov rcx, 0x68f7d2fe
jmp 0x14000a0f2
dec rcx
jmp 0x14000a5d1
jmp 0x14000acfa
jne 0x14000a0f2
jmp 0x14000a3de
jmp 0x14000ad67
jmp 0x14000ad84
jmp 0x14000adfa
jmp 0x14000ae2d
jmp 0x14000ae9c
jmp 0x14000aeb4
jmp 0x14000af05
jmp 0x14000af7f
jmp 0x14000afb0
jmp 0x14000b01e
jmp 0x14000b08a
jmp 0x14000b0c8
jmp 0x14000b0fd
jmp 0x14000b158
jmp 0x14000b1bc
jmp 0x14000b210
jmp 0x14000b264
jmp 0x14000b27a
jmp 0x14000b2d3
xor rcx, rcx
mov rdx, 0x6e93
mov r8d, 0x1000
lea r9d, [rcx + 0x40]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
call 0x14000b2f3
pop rsi
add rsi, 0xe7a
mov rdi, rax
mov rcx, 0x6e93
rep movsb byte [rdi], byte [rsi]
jmp rax
sub rsp, 0x28
call fcn.14001df5c
add rsp, 0x28
xor rcx, rcx
jmp 0x140008e55
Function at 0x3488a1570
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 fcn.3488a2140
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call fcn.3488a2140
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop word [rax + rax]

Function at 0x3488a15e0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x50
movsxd rbx, dword [0x3488ea064]
mov r12, rcx
test ebx, ebx
jle 0x3488a1710
mov rax, qword [0x3488ea068]
xor ecx, ecx
add rax, 0x18
nop word [rax + rax]
mov rdx, qword [rax]
cmp rdx, r12
ja 0x3488a162c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x3488a16b3
add ecx, 1
add rax, 0x28
cmp ecx, ebx
jne 0x3488a1610
mov rcx, r12
call fcn.3488a1e20
mov rsi, rax
test rax, rax
je 0x3488a1732
mov rax, qword [0x3488ea068]
lea rbx, [rbx + rbx*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rsi
mov dword [rax], 0
call fcn.3488a1f50
mov ecx, dword [rsi + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x3488ea068]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x3488a1717
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x3488a16ac
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x3488a16c0
add dword [0x3488ea064], 1
add rsp, 0x50
pop rbx
pop rsi
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 rbx, qword [0x3488ea068]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x3488a16ac
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.3488a1570
nop dword [rax]
xor ebx, ebx
jmp 0x3488a1637
mov rax, qword [0x3488ea068]
mov edx, dword [rsi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.3488a1570
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.3488a1570
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x3488a1a90
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x3488ea0a0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x3488ea080]
test rbx, rbx
je 0x3488a1ae4
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 0x3488a1adb
test r12, r12
je 0x3488a1adb
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x3488a1ac0
lea rcx, [0x3488ea0a0]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x3488a1e20
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x3488e7250]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x3488a1e40
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x3488a1e48
ret
cmp word [r8 + 0x18], 0x20b
jne 0x3488a1e40
movzx eax, word [r8 + 0x14]
sub rcx, rdx
movzx edx, word [r8 + 6]
lea rax, [r8 + rax + 0x18]
test edx, edx
je 0x3488a1e95
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x3488a1e8c
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x3488a1e40
add rax, 0x28
cmp rax, r9
jne 0x3488a1e78
xor eax, eax
ret

Function at 0x3488a1ea0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x3488e7250]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x3488a1ec0
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x3488a1ec8
mov eax, r8d
ret
cmp word [rax + 0x18], 0x20b
jne 0x3488a1ec0
movzx r8d, word [rax + 6]
mov eax, r8d
ret

Function at 0x3488a1f50
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x3488e7250]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x3488a1f70
movsxd rdx, dword [rax + 0x3c]
add rdx, rax
cmp dword [rdx], 0x4550
je 0x3488a1f78
mov rax, r8
ret
cmp word [rdx + 0x18], 0x20b
cmove r8, rax
mov rax, r8
ret
Function at 0x3488a23a0
Capabilities:
Check mutex on windows
Create thread
Resolve function by parsing pe exports

Disassembly:
push r15
mov eax, 0x43a70
push r14
push r13
push r12
push rdi
push rsi
push rbx
call fcn.3488a20f0
sub rsp, rax
lea r8, str.Microsoft_OneDrive_v150011164
mov edx, 1
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov r12, rax
test rax, rax
jne 0x3488a23db
xor eax, eax
jmp 0x3488a25b9
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x3488a23d4
call fcn.3488a26a0
xor ebx, ebx
xor r13d, r13d
xor r14d, r14d
mov r9, rax
movsxd rax, dword [rax + 0x3c]
xor r15d, r15d
mov eax, dword [r9 + rax + 0x88]
add rax, r9
mov r10d, dword [rax + 0x24]
mov r11d, dword [rax + 0x18]
mov esi, dword [rax + 0x1c]
mov edi, dword [rax + 0x20]
add r10, r9
add r11, r11
add rsi, r9
add rdi, r9
add r11, r10
cmp r10, r11
je 0x3488a248f
mov ecx, dword [rdi]
add rcx, r9
call fcn.3488a26c0
cmp eax, 0xe7c92f00
je 0x3488a246e
ja 0x3488a245a
cmp eax, 0x33742516
je 0x3488a247b
cmp eax, 0x5a758fc6
jne 0x3488a2485
movzx eax, word [r10]
mov r14d, dword [rsi + rax*4]
add r14, r9
jmp 0x3488a2485
cmp eax, 0xf4c627fc
jne 0x3488a2485
movzx eax, word [r10]
mov r13d, dword [rsi + rax*4]
add r13, r9
jmp 0x3488a2485
movzx eax, word [r10]
mov r15d, dword [rsi + rax*4]
add r15, r9
jmp 0x3488a2485
movzx eax, word [r10]
mov ebx, dword [rsi + rax*4]
add rbx, r9
add r10, 2
add rdi, 4
jmp 0x3488a2427
lea rdi, [rsp + 0x6c]
lea rcx, [rsp + 0x4b]
mov r9d, 0x43a04
mov dword [rsp + 0x4b], 0x76657273
mov r8, rdi
lea rdx, [0x3488a3040]
mov byte [rsp + 0x4f], 0
add rbx, 0x12
call fcn.3488a25d0
mov rcx, r15
xor edx, edx
lea rsi, [rsp + 0x58]
call fcn.3488a2380
mov qword [rsp + 0x38], rbx
mov r9, rsi
xor r8d, r8d
movzx eax, ax
lea r15, [rsp + 0x50]
or rcx, 0xffffffffffffffff
mov dword [rsp + 0x28], 4
mov dword [rsp + 0x30], eax
mov rdx, r15
mov dword [rsp + 0x20], 0x3000
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x58], 0x43a04
call fcn.3488a13a0
xor edx, edx
mov rcx, r14
mov r9d, 0x43a04
call fcn.3488a2380
mov qword [rsp + 0x30], rbx
mov r8, rdi
or rcx, 0xffffffffffffffff
movzx eax, ax
mov rdx, qword [rsp + 0x50]
mov qword [rsp + 0x60], 0
mov dword [rsp + 0x28], eax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
call fcn.3488a13ac
xor edx, edx
mov rcx, r13
mov r9d, 0x20
call fcn.3488a2380
mov qword [rsp + 0x30], rbx
mov r8, rsi
mov rdx, r15
movzx eax, ax
or rcx, 0xffffffffffffffff
mov dword [rsp + 0x28], eax
lea rax, [rsp + 0x44]
mov qword [rsp + 0x20], rax
call fcn.3488a13b8
mov r8, qword [rsp + 0x50]
xor r9d, r9d
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x20], 0
mov qword [rsp + 0x28], 0
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, 1
add rsp, 0x43a70
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x3488a25d0
Capabilities:
Encrypt data using rc4 ksa
Encrypt data using rc4 prga

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x128
mov rdi, r8
mov ebx, r9d
mov rbp, rcx
mov rsi, rdx
call sub.msvcrt.dll_strlen
lea r9, [rsp + 0x20]
mov r8d, eax
xor eax, eax
mov byte [rax + r9], al
inc rax
cmp rax, 0x100
jne 0x3488a25f6
xor ecx, ecx
xor r11d, r11d
mov eax, ecx
mov r10b, byte [r9 + rcx]
cdq
idiv r8d
movsxd rdx, edx
mov al, byte [rbp + rdx]
add eax, r10d
add eax, r11d
movzx r11d, al
movzx eax, al
mov dl, byte [rsp + rax + 0x20]
mov byte [r9 + rcx], dl
inc rcx
mov byte [rsp + rax + 0x20], r10b
cmp rcx, 0x100
jne 0x3488a260a
xor ecx, ecx
xor r10d, r10d
xor r9d, r9d
cmp ebx, ecx
jbe 0x3488a268d
lea edx, [r10 + 1]
movzx r10d, dl
movzx edx, dl
mov al, byte [rsp + rdx + 0x20]
lea r8d, [rax + r9]
movzx r9d, r8b
movzx r8d, r8b
mov r11b, byte [rsp + r8 + 0x20]
mov byte [rsp + rdx + 0x20], r11b
mov byte [rsp + r8 + 0x20], al
add al, byte [rsp + rdx + 0x20]
movzx eax, al
mov al, byte [rsp + rax + 0x20]
xor al, byte [rsi + rcx]
mov byte [rdi + rcx], al
inc rcx
jmp 0x3488a2649
add rsp, 0x128
pop rbx
pop rsi
pop rdi
pop rbp
ret

Function at 0x3488a26a0
Capabilities:
Access peb ldr_data

Disassembly:
mov rax, qword gs:[0x60]
mov rax, qword [rax + 0x18]
mov rax, qword [rax + 0x10]
mov rax, qword [rax]
mov rax, qword [rax + 0xf8]
ret
Function at 0x21f7827d0
Capabilities:
Write file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rdi, qword [sym.__acrt_iob_func]
xor ebx, ebx
mov rbp, rcx
mov rsi, rdx
test rdx, rdx
jle 0x21f782813
nop
mov r12, qword [rbp + rbx*8]
mov ecx, 1
add rbx, 1
call rdi
xor r8d, r8d
mov rcx, rax
mov rdx, r12
call sym.writeWindows__systemZio_205
cmp rsi, rbx
jg 0x21f7827f0
mov ecx, 1
call rdi
mov r8d, 1
mov edx, 1
lea rcx, [0x21f7a11bc]
mov r9, rax
call sym.fwrite
mov ecx, 1
call rdi
mov rcx, rax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp sym.fflush

Function at 0x21f782950
Capabilities:
Write file on windows

Disassembly:
push r13
push r12
sub rsp, 0x28
xor r8d, r8d
mov r13, rcx
mov r12, rdx
test rdx, rdx
je 0x21f782971
mov rcx, rdx
call sym.strlen
mov r8, rax
mov rcx, r12
mov r9, r13
mov edx, 1
call sym.fwrite
mov rcx, r13
add rsp, 0x28
pop r12
pop r13
jmp sym.fflush

Function at 0x21f782a30
Capabilities:
Write file on windows

Disassembly:
push r12
sub rsp, 0x20
mov ecx, 2
call qword [sym.__acrt_iob_func]
mov r8d, 0x4b
mov edx, 1
lea rcx, str._GC__cannot_register_thread_local_variable__too_many_thread_local_variables
mov r12, rax
mov r9, rax
call sym.fwrite
mov rcx, r12
call sym.fflush
mov ecx, 1
call sym.exit
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x21f787ab0
Capabilities:
Write file on windows

Disassembly:
push r13
push r12
push rbx
sub rsp, 0x20
mov rbx, rdx
mov r13, rcx
mov ecx, 2
call qword [sym.__acrt_iob_func]
mov rcx, r13
mov r8, rbx
mov edx, 1
mov r12, rax
mov r9, rax
call sym.fwrite
mov rcx, r12
add rsp, 0x20
pop rbx
pop r12
pop r13
jmp sym.fflush
Function at 0x21f78f550
Capabilities:
Write file on windows

Disassembly:
push rbp
mov rbp, rsp
push r12
push rbx
sub rsp, 0x150
movaps xmmword [rbp - 0x20], xmm6
cmp qword [0x21f7b98b8], 0
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov byte [rbp - 0x131], 1
je 0x21f78f642
mov rax, qword [0x21f7b98a8]
lea rcx, [rbp - 0x120]
mov rdx, rbp
mov qword [rbp - 0x130], rax
lea rax, [rbp - 0x130]
mov qword [0x21f7b98a8], rax
call sym._setjmp
cdqe
mov qword [rbp - 0x128], rax
test rax, rax
jne 0x21f78f668
xor r12d, r12d
cmp qword [rbp + 0x10], 0
je 0x21f78f613
mov rcx, qword [rbp + 0x10]
call sym.strlen
mov edx, 7
lea rcx, [0x21f79f020]
cmp rax, rdx
movq xmm6, rax
mov rbx, rax
cmovge rdx, rax
movq xmm0, rdx
add rdx, 0x11
punpcklqdq xmm6, xmm0
call sym.rawNewObj__system_5699.constprop.0
mov rdx, qword [rbp + 0x10]
lea r8, [rbx + 1]
movups xmmword [rax], xmm6
lea rcx, [rax + 0x10]
mov r12, rax
call sym.memcpy
mov rcx, r12
call qword [0x21f7b98b8]
mov rax, qword [0x21f7b98a8]
cmp qword [rbp - 0x128], 0
mov byte [rbp - 0x131], 0
mov rax, qword [rax]
mov qword [0x21f7b98a8], rax
jne 0x21f78f6d5
movzx eax, byte [rbp - 0x131]
test al, al
jne 0x21f78f6f0
movaps xmm6, xmmword [rbp - 0x20]
add rsp, 0x150
pop rbx
pop r12
pop rbp
ret
mov rax, qword [0x21f7b98a8]
mov rax, qword [rax]
mov qword [rbp - 0x128], 0
mov qword [0x21f7b98a8], rax
mov rax, qword [0x21f7b98a0]
mov rbx, qword [rax + 0x28]
test rbx, rbx
je 0x21f78f6a5
add qword [rbx - 0x10], 8
mov rax, qword [0x21f7b98a0]
test rax, rax
je 0x21f78f6c0
mov rdx, qword [rax - 0x10]
lea rcx, [rax - 0x10]
sub rdx, 8
mov qword [rax - 0x10], rdx
cmp rdx, 7
ja 0x21f78f6c0
call sym.addZCT__system_5316.constprop.0
cmp qword [rbp - 0x128], 0
mov qword [0x21f7b98a0], rbx
je 0x21f78f642
mov rcx, qword [0x21f7b98a0]
test rcx, rcx
je 0x21f78f720
call sym.raiseExceptionAux__system_2868
jmp 0x21f78f642
mov ecx, 2
call qword [sym.__acrt_iob_func]
mov rcx, qword [rbp + 0x10]
mov r8, qword [rbp + 0x18]
mov edx, 1
mov r12, rax
mov r9, rax
call sym.fwrite
mov rcx, r12
call sym.fflush
jmp 0x21f78f651
call sym.sysFatal__system_2900.constprop.0
nop
nop word cs:[rax + rax]
Function at 0x21f797440
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 sym.__acrt_iob_func
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sym.fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call sym.__acrt_iob_func
mov r8, rbx
mov rdx, qword [rbp + 0x20]
mov rcx, rax
call sym.vfprintf
call sym.abort
nop

Function at 0x21f797db2
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x21f7bc988]
test eax, eax
je 0x21f797e4a
lea rax, [0x21f7bc960]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x21f7bc990]
mov qword [rbp - 8], rax
jmp 0x21f797e2e
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 0x21f797e22
cmp qword [rbp - 0x10], 0
je 0x21f797e22
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 0x21f797de8
lea rax, [0x21f7bc960]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x21f797e4b
nop
add rsp, 0x30
pop rbp
ret

Function at 0x21f797f50
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 0x21f797f78
mov eax, 0
jmp 0x21f797fc6
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 0x21f797fa1
mov eax, 0
jmp 0x21f797fc6
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 0x21f797fc1
mov eax, 0
jmp 0x21f797fc6
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x21f797fcc
Capabilities:
Enumerate pe sections

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x18], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x18]
add rax, rdx
add rax, 0x18
mov qword [rbp - 8], rax
jmp 0x21f79804a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x21f798041
mov rax, qword [rbp - 8]
mov edx, dword [rax + 0xc]
mov rax, qword [rbp - 8]
mov eax, dword [rax + 8]
add eax, edx
mov eax, eax
cmp qword [rbp + 0x18], rax
jae 0x21f798041
mov rax, qword [rbp - 8]
jmp 0x21f79805f
add dword [rbp - 0xc], 1
add qword [rbp - 8], 0x28
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0xc], eax
jb 0x21f798014
mov eax, 0
add rsp, 0x20
pop rbp
ret