joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140020ee0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x48
mov rsi, rcx
mov r9, qword [rcx]
test r9, r9
je 0x140020f3b
mov r10, qword [rsi + 8]
mov rcx, qword [rsi + 0x10]
cmp rcx, r10
jae 0x140020f3b
movzx eax, byte [r9 + rcx]
cmp eax, 0x49
je 0x140020f56
cmp eax, 0x42
jne 0x140020f3b
lea r11, [rcx + 1]
mov qword [rsi + 0x10], r11
cmp r11, r10
jae 0x140021006
cmp byte [r9 + r11], 0x5f
jne 0x140021006
lea rax, [rcx + 2]
mov qword [rsi + 0x10], rax
xor eax, eax
jmp 0x14002106e
mov rcx, rsi
xor edx, edx
call fcn.14001c620
mov edi, eax
add dil, dil
mov eax, edi
add rsp, 0x48
pop rbx
pop rdi
pop rsi
pop r14
ret
inc rcx
mov qword [rsi + 0x10], rcx
mov rcx, rsi
xor edx, edx
call fcn.14001c620
test al, al
jne 0x140021101
mov rcx, qword [rsi + 0x20]
test rcx, rcx
je 0x140020f92
lea rdx, [0x1413b8993]
mov r8d, 1
call fcn.140018320
test al, al
jne 0x140021101
mov rax, qword [rsi]
mov dil, 1
test rax, rax
je 0x140020f4a
xor r14d, r14d
lea rbx, [0x1413b8d48]
nop word [rax + rax]
mov rcx, qword [rsi + 0x10]
cmp rcx, qword [rsi + 8]
jae 0x140020fc4
cmp byte [rax + rcx], 0x45
je 0x14002112a
sub r14, 1
jb 0x140020fe9
mov rcx, qword [rsi + 0x20]
test rcx, rcx
je 0x140020fe9
mov r8d, 2
mov rdx, rbx
call fcn.140018320
test al, al
jne 0x140021101
mov rcx, rsi
call fcn.14001de80
test al, al
jne 0x140021101
mov rax, qword [rsi]
test rax, rax
jne 0x140020fb0
jmp 0x140020f4a
xor eax, eax
mov edi, 0x3e
nop dword [rax]
mov r8b, 1
cmp r11, r10
jae 0x1400210c8
movzx edx, byte [r9 + r11]
cmp dl, 0x5f
je 0x140021062
lea ebx, [rdx - 0x30]
cmp bl, 0xa
jb 0x14002104c
lea ebx, [rdx - 0x61]
cmp bl, 0x1a
jae 0x14002103b
add dl, 0xa9
jmp 0x14002104a
lea ebx, [rdx - 0x41]
cmp bl, 0x1a
jae 0x1400210c8
add dl, 0xe3
mov ebx, edx
inc r11
mov qword [rsi + 0x10], r11
mul rdi
jo 0x1400210c8
movzx edx, bl
add rax, rdx
jae 0x140021010
jmp 0x1400210c8
inc r11
mov qword [rsi + 0x10], r11
inc rax
je 0x1400210c8
cmp rax, rcx
jae 0x1400210c5
mov ecx, dword [rsi + 0x18]
inc ecx
cmp ecx, 0x1f4
ja 0x140021109
cmp qword [rsi + 0x20], 0
je 0x140021123
movups xmm0, xmmword [rsi]
movups xmm1, xmmword [rsi + 0x10]
movaps xmmword [rsp + 0x30], xmm1
movaps xmmword [rsp + 0x20], xmm0
mov qword [rsi + 0x10], rax
mov dword [rsi + 0x18], ecx
mov rcx, rsi
call fcn.140020ee0
movaps xmm0, xmmword [rsp + 0x20]
movaps xmm1, xmmword [rsp + 0x30]
movups xmmword [rsi], xmm0
movups xmmword [rsi + 0x10], xmm1
jmp 0x140020f4c
mov r8b, 1
xor edi, edi
mov rcx, qword [rsi + 0x20]
test rcx, rcx
je 0x140021118
lea rax, [0x1413b8cf8]
lea rdx, [0x1413b8d08]
test r8b, r8b
cmovne rdx, rax
xor r8b, 1
movzx eax, r8b
lea r8, [rax + rax*8]
add r8, 0x10
call fcn.140018320
test al, al
je 0x140021118
mov dil, 2
jmp 0x140020f4a
mov dil, 1
xor r8d, r8d
mov rcx, qword [rsi + 0x20]
test rcx, rcx
jne 0x1400210d3
mov qword [rsi], 0
mov byte [rsi + 8], dil
xor edi, edi
jmp 0x140020f4a
inc rcx
mov qword [rsi + 0x10], rcx
jmp 0x140020f4a
Function at 0x140024f80
Capabilities:
Write file on windows

Disassembly:
push rsi
push rdi
sub rsp, 0xa8
mov rdi, rdx
mov rsi, rcx
movups xmm0, xmmword [0x1413bb730]
movaps xmmword [rsp + 0x60], xmm0
mov eax, 0xffffffff
cmp r9, rax
cmovb rax, r9
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], r8
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
mov rcx, rdx
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.ntdll.dll_NtWriteFile]
cmp eax, 0x103
jne 0x140024ff3
mov rcx, rdi
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [rsp + 0x60]
cmp eax, 0x103
je 0x14002502a
test eax, eax
js 0x140025004
mov rax, qword [rsp + 0x68]
mov qword [rsi + 8], rax
xor eax, eax
jmp 0x14002501d
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov eax, 1
mov qword [rsi], rax
add rsp, 0xa8
pop rdi
pop rsi
ret
mov byte [rsp + 0x5c], 0
mov dword [rsp + 0x58], 0
lea rax, [0x1413bb790]
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x80], 1
lea rax, [rsp + 0x50]
mov qword [rsp + 0x88], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x90], xmm0
lea rcx, [rsp + 0x58]
lea rdx, [rsp + 0x78]
call fcn.140023790
mov rcx, rax
call fcn.1400238d0
mov ecx, 7
int 0x29
ud2
Function at 0x14002ca40
Capabilities:
Read file on windows

Disassembly:
push rsi
push rdi
sub rsp, 0xa8
mov rdi, rdx
mov rsi, rcx
movups xmm0, xmmword [0x1413bb730]
movaps xmmword [rsp + 0x60], xmm0
mov eax, 0xffffffff
cmp r9, rax
cmovb rax, r9
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], r8
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
mov rcx, rdx
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.ntdll.dll_NtReadFile]
cmp eax, 0x103
jne 0x14002caac
mov rcx, rdi
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [rsp + 0x60]
cmp eax, 0xc0000011
jne 0x14002cabb
xorps xmm0, xmm0
movups xmmword [rsi], xmm0
jmp 0x14002caf3
cmp eax, 0x103
je 0x14002cafd
test eax, eax
js 0x14002cad8
mov rax, qword [rsp + 0x68]
mov qword [rsi + 8], rax
mov qword [rsi], 0
jmp 0x14002caf3
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov qword [rsi], 1
add rsp, 0xa8
pop rdi
pop rsi
ret
mov byte [rsp + 0x5c], 0
mov dword [rsp + 0x58], 0
lea rax, [0x1413bb790]
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x80], 1
lea rax, [rsp + 0x50]
mov qword [rsp + 0x88], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x90], xmm0
lea rcx, [rsp + 0x58]
lea rdx, [rsp + 0x78]
call fcn.140023790
mov rcx, rax
call fcn.1400238d0
mov ecx, 7
int 0x29
ud2

Function at 0x14002de70
Capabilities:
Create directory

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x50
in al, dx
push rax
Function at 0x140038270
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rsi
push rdi
sub rsp, 0x88
movdqa xmmword [rsp + 0x70], xmm6
mov rsi, rcx
lea rcx, [rsp + 0x40]
call fcn.140025880
mov rcx, qword [rsp + 0x40]
mov rax, qword [rsp + 0x48]
test rcx, rcx
je 0x1400382e6
mov rdx, qword [rsp + 0x50]
mov qword [rsp + 0x58], rcx
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rdx
lea rcx, [rsp + 0x28]
lea rdx, [rsp + 0x58]
call fcn.140038190
mov rdi, qword [rsp + 0x28]
test rdi, rdi
je 0x1400382f4
movdqu xmm6, xmmword [rsp + 0x30]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140038314
mov qword [rsi], rdi
movdqu xmmword [rsi + 8], xmm6
jmp 0x140038305
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], 0
lea rcx, [rsp + 0x28]
call fcn.140025a60
mov qword [rsi], 0
movaps xmm6, xmmword [rsp + 0x70]
add rsp, 0x88
pop rdi
pop rsi
ret
mov qword [rsi], 0
movq rax, xmm6
test rax, rax
je 0x140038305
mov rcx, qword [0x1413cebb8]
xor edx, edx
mov r8, rdi
movaps xmm6, xmmword [rsp + 0x70]
add rsp, 0x88
pop rdi
pop rsi
jmp qword [sym.imp.KERNEL32.dll_HeapFree]
Function at 0x14003b120
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
mov eax, 0x1098
call fcn.140042510
sub rsp, rax
lea rbp, [rsp + 0x80]
movaps xmmword [rbp + 0x1000], xmm6
mov qword [rbp + 0xff8], 0xfffffffffffffffe
mov qword [rbp + 0xfd8], rdx
mov r14, rcx
lea rsi, [rbp - 0x50]
mov r8d, 0x1000
mov rcx, rsi
xor edx, edx
call fcn.140042d90
mov dword [rbp + 0xfec], 0
xorps xmm6, xmm6
movaps xmmword [rbp + 0xfb0], xmm6
mov qword [rbp + 0xfc0], 0
lea r15, [rbp + 0xfec]
mov qword [rbp + 0xfc8], r15
lea r12, [0x140030dd0]
mov qword [rsp + 0x20], r12
lea r9, [rbp + 0xfb0]
mov rcx, r14
mov rdx, rsi
mov r8d, 0x1000
call qword [sym.imp.KERNEL32.dll_ReadFileEx]
test eax, eax
je 0x14003b30e
mov r13, qword [sym.imp.KERNEL32.dll_SleepEx]
lea rsi, [rbp + 0xfb0]
mov rdi, qword [sym.imp.KERNEL32.dll_WriteFileEx]
mov qword [rbp + 0xfe0], r14
mov ecx, 0xffffffff
mov edx, 1
call r13
cmp dword [rbp + 0xfec], 0
je 0x14003b1e7
cmp dword [rbp + 0xff0], 0
jne 0x14003b323
mov ebx, dword [rbp + 0xff4]
test rbx, rbx
je 0x14003b323
cmp ebx, 0x1000
ja 0x14003b367
xor r14d, r14d
nop dword [rax + rax]
cmp r14, rbx
ja 0x14003b353
lea rdx, [r14 + rbp]
add rdx, 0xffffffffffffffb0
mov r8d, ebx
sub r8d, r14d
mov dword [rbp + 0xfec], 0
movaps xmmword [rbp + 0xfb0], xmm6
mov qword [rbp + 0xfc0], 0
mov qword [rbp + 0xfc8], r15
mov qword [rsp + 0x20], r12
mov rcx, qword [rbp + 0xfd8]
mov r9, rsi
call rdi
test eax, eax
je 0x14003b316
nop word cs:[rax + rax]
mov ecx, 0xffffffff
mov edx, 1
call r13
cmp dword [rbp + 0xfec], 0
je 0x14003b290
cmp dword [rbp + 0xff0], 0
jne 0x14003b31c
mov eax, dword [rbp + 0xff4]
add r14, rax
cmp r14, rbx
jne 0x14003b230
mov dword [rbp + 0xfec], 0
movaps xmmword [rbp + 0xfb0], xmm6
mov qword [rbp + 0xfc0], 0
mov qword [rbp + 0xfc8], r15
mov qword [rsp + 0x20], r12
mov r14, qword [rbp + 0xfe0]
mov rcx, r14
lea rdx, [rbp - 0x50]
mov r8d, 0x1000
mov r9, rsi
call qword [sym.imp.KERNEL32.dll_ReadFileEx]
test eax, eax
jne 0x14003b1e7
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x14003b323
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14, qword [rbp + 0xfe0]
mov rsi, qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r14
call rsi
mov rcx, qword [rbp + 0xfd8]
call rsi
movaps xmm6, xmmword [rbp + 0x1000]
add rsp, 0x1098
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
lea r8, [0x1413bba78]
mov rcx, r14
mov rdx, rbx
call fcn.140050c40
jmp 0x14003b37b
lea r8, [0x1413bba78]
mov edx, 0x1000
mov rcx, rbx
call fcn.1400509c0
ud2
Function at 0x14003b3d0
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push rbp
sub rsp, 0x80
lea rbp, [rsp + 0x80]
mov qword [rbp - 8], 0xfffffffffffffffe
xorps xmm0, xmm0
movaps xmmword [rbp - 0x20], xmm0
lea rcx, [rbp - 0x20]
mov edx, 0x10
call qword [sym.imp.ADVAPI32.dll_SystemFunction036]
test al, al
je 0x14003b40f
mov rax, qword [rbp - 0x20]
add rsp, 0x80
pop rbp
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
shl rax, 0x20
or rax, 2
mov qword [rbp - 0x10], rax
lea rax, [rbp - 0x10]
mov qword [rbp - 0x30], rax
lea rax, [0x14002a660]
mov qword [rbp - 0x28], rax
lea rax, [0x1413bbc40]
mov qword [rbp - 0x60], rax
mov qword [rbp - 0x58], 1
mov qword [rbp - 0x40], 0
lea rax, [rbp - 0x30]
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], 1
lea rdx, [0x1413bbc78]
lea rcx, [rbp - 0x60]
call fcn.140050880
ud2

Function at 0x14003d270
Capabilities:
Read file on windows

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x60
mov rdi, rdx
cmp qword [rdx], 0
jne 0x14003d37f
mov rsi, rcx
mov rbx, qword [rdi + 0x18]
mov rax, qword [rbx + 8]
test rax, rax
jne 0x14003d2a8
mov rdx, qword [rbx + 0x10]
lea rax, [rdx + 0xf]
cmp rax, 0xf
jbe 0x14003d342
xor eax, eax
mov rdx, qword [rbx + 0x10]
cmp rax, rdx
je 0x14003d361
sub rax, rdx
add rdx, qword [rbx]
mov r8, qword [rdi + 0x10]
mov ecx, 0xffffffff
cmp rax, rcx
cmovae rax, rcx
mov dword [rsp + 0x30], 0
mov rcx, qword [rdi + 0x20]
mov qword [rsp + 0x20], r8
lea r9, [rsp + 0x30]
mov r8d, eax
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14003d2fe
mov eax, dword [rsp + 0x30]
mov ecx, 2
test rax, rax
jne 0x14003d31b
jmp 0x14003d310
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x14003d316
cmp eax, 0x6d
jne 0x14003d332
mov byte [rsi + 1], 0
jmp 0x14003d326
mov ecx, 1
mov qword [rdi], rcx
mov qword [rdi + 8], rax
mov byte [rsi + 1], 1
xor eax, eax
mov byte [rsi], al
add rsp, 0x60
pop rbx
pop rdi
pop rsi
ret
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov al, 1
jmp 0x14003d328
mov r8d, 0x10
mov rcx, rbx
call fcn.1400506f0
mov rax, qword [rbx + 8]
mov rdx, qword [rbx + 0x10]
cmp rax, rdx
jne 0x14003d2b5
mov r8d, 1
mov rcx, rbx
mov rdx, rax
call fcn.1400506f0
mov rax, qword [rbx + 8]
mov rdx, qword [rbx + 0x10]
jmp 0x14003d2b5
mov qword [rsp + 0x30], 0
lea rdx, [rsp + 0x30]
mov rcx, rdi
call fcn.140051b70
ud2

Function at 0x140046b0c
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140046908
Function at 0x140836058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.1408361df
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x140836089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14083606f
add dl, dl
jne 0x140836096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1408360f6
xor eax, eax
add dl, dl
jne 0x1408360a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1408361ad
add dl, dl
jne 0x1408360b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1408360c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1408360d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1408360dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1408360ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x14083607e
mov eax, 1
add dl, dl
jne 0x140836106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140836113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1408360fb
sub eax, ebx
mov ebx, 1
jne 0x14083614c
mov ecx, 1
add dl, dl
jne 0x14083612e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14083613b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140836123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14083607e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x140836168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140836175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14083615d
cmp eax, 0x7d00
jae 0x14083619b
cmp eax, 0x500
jb 0x140836196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14083607e
cmp eax, 0x7f
ja 0x14083619e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14083607e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1408361d2
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x14083607e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140004be0
Capabilities:
Get file size
Read file on windows

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x58
mov rsi, rdx
mov rdi, rcx
mov rax, qword [rcx + 8]
lea rbx, [rax*4 + 2]
xor r14d, r14d
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rcx, [0x140027a70]
nop dword [rax + rax]
mov edx, dword [rcx + r14*4 + 0x10]
cmp edx, eax
je 0x140004c57
mov edx, dword [rcx + r14*4 + 0x14]
cmp edx, eax
je 0x140004c48
mov edx, dword [rcx + r14*4 + 0x18]
cmp edx, eax
je 0x140004c4d
mov edx, dword [rcx + r14*4 + 0x1c]
cmp edx, eax
je 0x140004c53
add r14, 4
cmp r14, 0x80
jne 0x140004c10
mov eax, 0xffffffff
jmp 0x140004c5a
inc r14
jmp 0x140004c57
add r14, 2
jmp 0x140004c57
add r14, 3
mov eax, r14d
shl rax, 4
mov rdx, qword [rax + rcx + 0x218]
mov r8, qword [rax + rcx + 0x210]
add r8, rdx
add rbx, rdx
mov qword [rax + rcx + 0x218], rbx
lea rcx, [rsp + 0x48]
mov rdx, rdi
call fcn.140004910
mov rdi, qword [rsp + 0x48]
mov rax, qword [rsp + 0x50]
mov word [rdi + rax], 0
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
mov rcx, rdi
mov edx, 0x80000000
mov r8d, 1
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
je 0x140004d52
mov rdi, rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rdx, [rsp + 0x40]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x140004d52
mov eax, dword [rsp + 0x40]
mov dword [rsi + 0xc], eax
xor ebx, ebx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r8d, dword [rsi + 0xc]
mov rdx, qword [rsi]
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x3c]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140004d4a
mov eax, dword [rsp + 0x3c]
cmp eax, dword [rsi + 0xc]
jne 0x140004d58
mov dword [rsi + 0xc], eax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov bl, 1
test eax, eax
jne 0x140004d5a
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140004d5a
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor ebx, ebx
mov eax, ebx
add rsp, 0x58
pop rbx
pop rdi
pop rsi
pop r14
ret
Function at 0x140004d70
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x50
mov esi, r8d
mov rdi, rdx
mov rbx, rcx
mov rax, qword [rcx + 8]
lea r14, [rax*4 + 2]
xor r15d, r15d
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rcx, [0x140027a70]
mov edx, dword [rcx + r15*4 + 0x10]
cmp edx, eax
je 0x140004de7
mov edx, dword [rcx + r15*4 + 0x14]
cmp edx, eax
je 0x140004dd8
mov edx, dword [rcx + r15*4 + 0x18]
cmp edx, eax
je 0x140004ddd
mov edx, dword [rcx + r15*4 + 0x1c]
cmp edx, eax
je 0x140004de3
add r15, 4
cmp r15, 0x80
jne 0x140004da0
mov eax, 0xffffffff
jmp 0x140004dea
inc r15
jmp 0x140004de7
add r15, 2
jmp 0x140004de7
add r15, 3
mov eax, r15d
shl rax, 4
mov rdx, qword [rax + rcx + 0x218]
mov r8, qword [rax + rcx + 0x210]
add r8, rdx
add r14, rdx
mov qword [rax + rcx + 0x218], r14
lea rcx, [rsp + 0x40]
mov rdx, rbx
call fcn.140004910
mov rbx, qword [rsp + 0x40]
mov rax, qword [rsp + 0x48]
mov word [rbx + rax], 0
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
mov rcx, rbx
mov edx, 0x40000000
mov r8d, 1
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
je 0x140004eba
mov r14, rax
xor ebx, ebx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x3c]
mov rcx, r14
mov rdx, rdi
mov r8d, esi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140004eb2
cmp dword [rsp + 0x3c], esi
jne 0x140004ec0
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov bl, 1
test eax, eax
jne 0x140004ec2
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140004ec2
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor ebx, ebx
mov eax, ebx
add rsp, 0x50
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret
Function at 0x140005ef0
Capabilities:
Get file size

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x50
mov rsi, rcx
mov rax, qword [rcx + 8]
lea rdi, [rax*4 + 2]
xor ebx, ebx
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rcx, [0x140027a70]
nop word cs:[rax + rax]
mov edx, dword [rcx + rbx*4 + 0x10]
cmp edx, eax
je 0x140005f63
mov edx, dword [rcx + rbx*4 + 0x14]
cmp edx, eax
je 0x140005f54
mov edx, dword [rcx + rbx*4 + 0x18]
cmp edx, eax
je 0x140005f59
mov edx, dword [rcx + rbx*4 + 0x1c]
cmp edx, eax
je 0x140005f5f
add rbx, 4
cmp rbx, 0x80
jne 0x140005f20
mov eax, 0xffffffff
jmp 0x140005f65
inc rbx
jmp 0x140005f63
add rbx, 2
jmp 0x140005f63
add rbx, 3
mov eax, ebx
shl rax, 4
mov rdx, qword [rax + rcx + 0x218]
mov r8, qword [rax + rcx + 0x210]
add r8, rdx
add rdi, rdx
mov qword [rax + rcx + 0x218], rdi
lea rcx, [rsp + 0x40]
mov rdx, rsi
call fcn.140004910
mov rdi, qword [rsp + 0x40]
mov rax, qword [rsp + 0x48]
mov word [rdi + rax], 0
xor esi, esi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
mov rcx, rdi
mov edx, 0x80000000
mov r8d, 1
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
je 0x140006024
mov rdi, rax
xor esi, esi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rdx, [rsp + 0x38]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x140006024
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x14000601e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [rsp + 0x38]
jmp 0x14000602a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, esi
add rsp, 0x50
pop rbx
pop rdi
pop rsi
ret
Function at 0x140007940
Capabilities:
Delete file

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x30
mov rsi, rcx
mov rdi, qword [rcx + 8]
xor ebx, ebx
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rcx, [0x140027a70]
nop dword [rax]
mov edx, dword [rcx + rbx*4 + 0x10]
cmp edx, eax
je 0x1400079a3
mov edx, dword [rcx + rbx*4 + 0x14]
cmp edx, eax
je 0x140007994
mov edx, dword [rcx + rbx*4 + 0x18]
cmp edx, eax
je 0x140007999
mov edx, dword [rcx + rbx*4 + 0x1c]
cmp edx, eax
je 0x14000799f
add rbx, 4
cmp rbx, 0x80
jne 0x140007960
mov eax, 0xffffffff
jmp 0x1400079a5
inc rbx
jmp 0x1400079a3
add rbx, 2
jmp 0x1400079a3
add rbx, 3
mov eax, ebx
shl rax, 4
mov rdx, qword [rax + rcx + 0x218]
mov r8, qword [rax + rcx + 0x210]
add r8, rdx
lea rdx, [rdx + rdi*4]
add rdx, 2
mov qword [rax + rcx + 0x218], rdx
lea rcx, [rsp + 0x20]
mov rdx, rsi
call fcn.140004910
mov rcx, qword [rsp + 0x20]
mov rax, qword [rsp + 0x28]
mov word [rcx + rax], 0
add rsp, 0x30
pop rbx
pop rdi
pop rsi
jmp qword [sym.imp.KERNEL32.dll_DeleteFileW]
Function at 0x14000ecd8
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x14000eac8
Function at 0x140011fb0
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 0x140011fe0
xor eax, eax
jmp 0x1400120a3
mov rbp, rbx
cmp word [rax], si
je 0x140012005
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x140011fec
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x140011fe8
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.140011f00
movsxd r14, eax
test eax, eax
jne 0x140012043
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x140011fd9
mov rcx, r14
call fcn.140010554
mov rdi, rax
test rax, rax
jne 0x14001205c
xor ecx, ecx
call fcn.1400105b4
jmp 0x140012038
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.140011f00
test eax, eax
jne 0x14001208d
mov rcx, rdi
call fcn.1400105b4
jmp 0x140012097
xor ecx, ecx
call fcn.1400105b4
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