joyce8/EMBER2024-capa huggingface dataset:
Function at 0x180079d04
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x40
mov rbx, rdx
lea r8, [rsp + 0x60]
mov edi, ecx
mov edx, 0x20000001
lea rcx, str._x_sys_default_locale
mov r9d, 2
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
test eax, eax
jne 0x180079d3e
xor r9d, r9d
mov dword [rsp + 0x60], r9d
jmp 0x180079d43
mov r9d, dword [rsp + 0x60]
and qword [rsp + 0x30], 0
mov r8d, edi
and dword [rsp + 0x28], 0
xor edx, edx
mov ecx, 0x1300
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, eax
test eax, eax
je 0x180079d8c
mov r8, qword [rbx]
dec r8
add r8, rdx
movzx ecx, byte [r8]
lea rax, [0x1800d5ad0]
cmp byte [rcx + rax], 0
je 0x180079d8c
dec r8
sub rdx, 1
jne 0x180079d72
mov rbx, qword [rsp + 0x50]
mov rax, rdx
add rsp, 0x40
pop rdi
ret

Function at 0x18008dd70
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
lea r9, [rdx + rdx]
movabs r8, 0xcbf29ce484222325
xor edx, edx
test r9, r9
je 0x18007db1e
movzx eax, byte [rdx + rcx]
movabs r10, 0x100000001b3
xor r8, rax
inc rdx
imul r8, r10
cmp rdx, r9
jb 0x18007db01
mov rax, r8
ret
sub r8, rdx
mov rcx, rdx
sar r8, 1
mov rdx, r8
jmp 0x18007daec

Function at 0x1800af608
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x1800af61e
mov al, 1
jmp 0x1800af67e
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x1800af62f
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x1800af67c
mov ecx, dword [rcx + 0x18]
nop
call fcn.1800b5860
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x1800af67c
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x1800af67c
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x1800af67c
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x1800af67e
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x1800b321c
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x1050
call fcn.180097c90
sub rsp, rax
mov rax, qword [0x180101c00]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.1800af4e8
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x1800b326b
mov rax, rbp
jmp 0x1800b3373
mov rax, qword [rbx]
mov rcx, r14
sub rax, qword [rbx + 8]
and ecx, 0x3f
cqo
mov rbx, r14
sub rax, rdx
sar rbx, 6
sar rax, 1
mov r9, r15
lea r12, [rcx + rcx*8]
mov rsi, rax
lea rax, [0x180000000]
xor r8d, r8d
mov rdx, qword [rax + rbx*8 + 0x116ee0]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.1800b4c3c
mov r13, rax
lea rax, [0x180000000]
mov rcx, qword [rax + rbx*8 + 0x116ee0]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x1800b336f
mov rcx, qword [rcx + r12*8 + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 0x1000
mov qword [rsp + 0x20], rdi
lea rdx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1800b336f
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.1800b4c3c
test rax, rax
js 0x1800b336f
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x1800b336f
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x1800b3361
lea r8, [0x180000000]
cmp rcx, rdx
jae 0x1800b3361
cmp byte [rcx], 0xd
jne 0x1800b3347
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x1800b3356
cmp byte [rcx + 1], 0xa
jne 0x1800b3356
inc rcx
jmp 0x1800b3356
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0x102060]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x1800b3329
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x1800b3373
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.180097c60
mov rbx, qword [rsp + 0x1090]
add rsp, 0x1050
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x1800b3fdc
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
movsxd r15, ecx
lea r9, [0x180116ee0]
mov rax, r15
mov rbp, r15
and eax, 0x3f
sar rbp, 6
mov ecx, 4
xor esi, esi
mov r14, rdx
lea rdi, [rax + rax*8]
mov rax, qword [r9 + rbp*8]
lea r13d, [rcx + 6]
mov r10, qword [rax + rdi*8 + 0x28]
test r8, r8
je 0x1800b4033
cmp word [rdx], r13w
jne 0x1800b4033
or byte [rax + rdi*8 + 0x38], cl
jmp 0x1800b4038
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x1800b415d
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x1800b417e
lea r9, [rdx + 2]
cmp cx, r11w
je 0x1800b4071
mov rdx, r9
mov word [rbx], cx
jmp 0x1800b4098
cmp r9, r8
jae 0x1800b40a8
cmp word [r9], r13w
mov rax, r12
mov ecx, 4
cmove rax, rcx
add rdx, rax
mov eax, r13d
cmp word [r9], r13w
cmovne ax, r11w
mov word [rbx], ax
mov rax, r12
add rbx, rax
cmp rdx, r8
jb 0x1800b4052
jmp 0x1800b415d
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rsi
mov r8d, r12d
lea rdx, [rsp + 0x70]
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1800b4152
cmp dword [rsp + 0x80], esi
je 0x1800b4152
lea r8, [0x180116ee0]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x1800b412a
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x1800b40fa
mov word [rbx], r13w
jmp 0x1800b415a
mov ecx, 0xd
mov word [rsp + 0x78], ax
mov word [rbx], cx
mov rax, qword [r8 + rbp*8]
lea rcx, [rax + rdi*8]
mov al, byte [rsp + rsi + 0x78]
mov byte [rcx + rsi + 0x3a], al
inc rsi
cmp rsi, r12
jl 0x1800b4107
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x1800b415a
cmp word [rsp + 0x70], r13w
jne 0x1800b4137
cmp rbx, r14
je 0x1800b40f4
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.1800b4c44
cmp word [rsp + 0x70], r13w
je 0x1800b415d
mov ecx, 0xd
mov word [rbx], cx
add rbx, r12
sub rbx, r14
sar rbx, 1
lea eax, [rbx + rbx]
mov rbx, qword [rsp + 0x88]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r8, [0x180116ee0]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x1800b4157
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x1800b415d
Function at 0x1800b9bbc
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov esi, edx
mov ebx, ecx
call fcn.1800af188
mov ecx, ebx
lea r8, [rsp + 0x30]
and ecx, 0x3ff
mov r9d, 2
bts ecx, 0xa
mov edx, 0x20000001
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
xor edx, edx
test eax, eax
je 0x1800b9c5d
cmp ebx, dword [rsp + 0x30]
je 0x1800b9c56
test esi, esi
je 0x1800b9c56
mov r10, qword [rdi + 0x98]
mov r9d, edx
movzx r8d, word [r10]
lea rcx, [r10 + 2]
lea eax, [r8 - 0x41]
cmp ax, 0x19
jbe 0x1800b9c31
sub r8w, 0x61
cmp r8w, 0x19
ja 0x1800b9c3e
movzx r8d, word [rcx]
inc r9d
add rcx, 2
jmp 0x1800b9c1b
or rax, 0xffffffffffffffff
inc rax
cmp word [r10 + rax*2], dx
jne 0x1800b9c42
cmp r9d, eax
setne dl
mov eax, edx
jmp 0x1800b9c5f
mov eax, 1
jmp 0x1800b9c5f
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x1800bc038
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 0x1800bc068
xor eax, eax
jmp 0x1800bc12b
mov rbp, rbx
cmp word [rax], si
je 0x1800bc08d
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x1800bc074
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x1800bc070
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.1800bac9c
movsxd r14, eax
test eax, eax
jne 0x1800bc0cb
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x1800bc061
mov rcx, r14
call fcn.1800b0d04
mov rdi, rax
test rax, rax
jne 0x1800bc0e4
xor ecx, ecx
call fcn.1800aed90
jmp 0x1800bc0c0
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.1800bac9c
test eax, eax
jne 0x1800bc115
mov rcx, rdi
call fcn.1800aed90
jmp 0x1800bc11f
xor ecx, ecx
call fcn.1800aed90
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 0x1800bc148
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 0x1800bc1cf
mov rsi, rbx
cmp word [rax], bp
je 0x1800bc18e
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x1800bc178
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x1800bc174
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.1800b0d04
mov rdi, rax
test rax, rax
je 0x1800bc1bc
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.1800c2670
mov rbp, rdi
xor ecx, ecx
call fcn.1800aed90
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 0x1800c0d44
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.1800a335c
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x1800c0dce
cmp byte [rbp - 0x21], r15b
je 0x1800c0dc9
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x1800c0e04
call fcn.1800b24fc
test eax, eax
jne 0x1800c0df0
cmp byte [rbp - 0x21], r15b
je 0x1800c0de8
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x1800c0e04
cmp byte [rbp - 0x21], r15b
je 0x1800c0e01
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.1800a6794
test eax, eax
jne 0x1800c0ea4
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.1800a335c
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x1800c0e43
cmp byte [rbp - 0x21], r15b
je 0x1800c0e78
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x1800c0e78
call fcn.1800b24fc
test eax, eax
jne 0x1800c0e64
cmp byte [rbp - 0x21], r15b
je 0x1800c0e5d
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x1800c0e78
cmp byte [rbp - 0x21], r15b
je 0x1800c0e75
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.1800a6794
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x1800c0ea4
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x1800c0ea7
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x1800c0eb5
mov rcx, rdi
call fcn.1800aed90
cmp byte [rbp + 0x3f], r15b
je 0x1800c0ec4
mov rcx, qword [rbp + 0x27]
call fcn.1800aed90
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 0x1800c1b88
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.1800b4c44
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.1800b4c44
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x1800c1cd8
cmp rax, 0xffffffffffffffff
je 0x1800c1cd8
xor edi, edi
test rbp, rbp
jle 0x1800c1c83
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.1800af9c4
mov rbx, rax
test rax, rax
jne 0x1800c1c10
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x1800c1c79
mov edx, 0x8000
mov ecx, r14d
call fcn.1800bf568
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.1800b051c
cmp eax, 0xffffffff
je 0x1800c1c59
cdqe
sub rbp, rax
test rbp, rbp
jg 0x1800c1c20
mov edx, r15d
mov ecx, r14d
call fcn.1800bf568
jmp 0x1800c1c79
cmp byte [rsi + 0x38], dil
je 0x1800c1c70
cmp dword [rsi + 0x34], 5
jne 0x1800c1c70
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x1800c1c79
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.1800aed90
jmp 0x1800c1cec
jns 0x1800c1cec
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.1800b4c44
cmp rax, 0xffffffffffffffff
jne 0x1800c1ca4
cmp byte [rsi + 0x30], dil
je 0x1800c1cec
mov edi, dword [rsi + 0x2c]
jmp 0x1800c1cec
mov ecx, r14d
call fcn.1800b5860
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x1800c1cec
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 0x1800c1cec
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x1800c1ce5
mov eax, dword [rsi + 0x2c]
jmp 0x1800c1cea
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.1800b4c44
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 0x1800c2190
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x1800c21b8
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x1800c21b8
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x401c10
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x40
test dl, 7
jne 0x401d00
mov rbx, qword [rdx]
mov r14d, 0xffffffff
lea r15, [rsp + 0x3c]
mov rdi, r8
mov rsi, rcx
cmp r9, r14
cmovb r14, r9
nop
mov dword [rsp + 0x3c], 0xaaaaaaaa
mov qword [rsp + 0x20], 0
mov rcx, rbx
mov rdx, rdi
mov r8d, r14d
mov r9, r15
call sub.KERNEL32.dll_ReadFile
test eax, eax
jne 0x401cb3
call sub.KERNEL32.dll_GetLastError
movzx eax, ax
cmp eax, 0x3e3
je 0x401c40
cmp eax, 0x6c
jg 0x401c99
cmp eax, 0x26
je 0x401c9e
cmp eax, 0x40
jne 0x401cc2
mov word [rsp + 0x38], 0
mov dword [rsp + 0x34], 0
mov ax, 0x23
jmp 0x401cc6
cmp eax, 0x6d
jne 0x401cbb
mov word [rsp + 0x38], 0
mov dword [rsp + 0x34], 0
xor eax, eax
xor ecx, ecx
jmp 0x401cc6
mov ecx, dword [rsp + 0x3c]
xor eax, eax
jmp 0x401cc6
cmp eax, 0x3e5
je 0x401cec
mov ax, 0x10
mov qword [rsi], rcx
mov edx, dword [rsp + 0x34]
movzx ecx, word [rsp + 0x38]
mov word [rsi + 8], ax
mov rax, rsi
mov dword [rsi + 0xa], edx
mov word [rsi + 0xe], cx
add rsp, 0x40
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret
lea rcx, [0x0045177e]
mov edx, 0x18
xor r9d, r9d
call fcn.00401000
lea rcx, str.incorrect_alignment
mov edx, 0x13
xor r9d, r9d
call fcn.00401000
int3

Function at 0x402790
Capabilities:
Write file on windows

Disassembly:
push rsi
sub rsp, 0x40
mov rsi, rcx
mov rcx, qword [rdx]
mov rax, r8
mov r8d, 0xffffffff
mov dword [rsp + 0x3c], 0xaaaaaaaa
mov qword [rsp + 0x20], 0
mov rdx, rax
cmp r9, r8
cmovb r8, r9
lea r9, [rsp + 0x3c]
call sub.KERNEL32.dll_WriteFile
test eax, eax
je 0x4027d8
mov edx, dword [rsp + 0x3c]
xor eax, eax
jmp 0x4028c7
call sub.KERNEL32.dll_GetLastError
movzx ecx, ax
mov ax, 0x10
cmp ecx, 0x6c
jle 0x402821
cmp ecx, 0x3e4
jle 0x402868
cmp ecx, 0x6f8
je 0x402834
cmp ecx, 0x718
je 0x402834
cmp ecx, 0x3e5
jne 0x4028c7
lea rcx, [0x0045177e]
mov edx, 0x18
xor r9d, r9d
call fcn.00401000
cmp ecx, 0x20
jg 0x402849
cmp ecx, 6
je 0x40288a
cmp ecx, 8
jne 0x4028c7
mov word [rsp + 0x38], 0
mov dword [rsp + 0x34], 0
mov ax, 0x17
jmp 0x4028c7
cmp ecx, 0x21
je 0x40289f
cmp ecx, 0x40
jne 0x4028c7
mov word [rsp + 0x38], 0
mov dword [rsp + 0x34], 0
mov ax, 0x23
jmp 0x4028c7
cmp ecx, 0x6d
je 0x4028b4
cmp ecx, 0x3e3
jne 0x4028c7
mov word [rsp + 0x38], 0
mov dword [rsp + 0x34], 0
mov ax, 0x21
jmp 0x4028c7
mov word [rsp + 0x38], 0
mov dword [rsp + 0x34], 0
mov ax, 0x2a
jmp 0x4028c7
mov ax, 0x2b
mov word [rsp + 0x38], 0
mov dword [rsp + 0x34], 0
jmp 0x4028c7
mov word [rsp + 0x38], 0
mov dword [rsp + 0x34], 0
mov ax, 0x22
mov qword [rsi], rdx
mov edx, dword [rsp + 0x34]
movzx ecx, word [rsp + 0x38]
mov word [rsi + 8], ax
mov dword [rsi + 0xa], edx
mov word [rsi + 0xe], cx
add rsp, 0x40
pop rsi
ret
Function at 0x4028f0
Capabilities:
Set file attributes

Disassembly:
sub rsp, 0x48
vbroadcastss xmm0, dword [0x00450120]
mov qword [rsp + 0x28], rdx
lea rdx, [rsp + 0x30]
lea r8, [rsp + 0x28]
mov r9d, 8
mov dword [rsp + 0x20], 0x14
vmovaps xmmword [rsp + 0x30], xmm0
call sub.ntdll.dll_NtSetInformationFile
cmp eax, 0xc0000022
je 0x402947
test eax, eax
je 0x402940
cmp eax, 0xc0000008
je 0x402950
mov ax, 0x10
add rsp, 0x48
ret
xor eax, eax
add rsp, 0x48
ret
mov ax, 0xb
add rsp, 0x48
ret
lea rcx, [0x0045177e]
mov edx, 0x18
xor r9d, r9d
call fcn.00401000
int3
Function at 0x413130
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
test dl, 7
jne 0x413399
mov rdi, qword [rdx]
mov rsi, rcx
mov ecx, dword [rdi + 0x20]
test rcx, rcx
je 0x4133ad
mov rax, qword [rdi + 8]
xor edx, edx
div rcx
mov r15, rdx
mov edx, 0
mov rbx, rax
xor eax, eax
cmp rbx, qword [rdi + 0x18]
jae 0x413342
mov rdx, qword [rdi + 0x10]
mov eax, ecx
mul dword [rdx + rbx*4]
jo 0x413385
mov rcx, qword [rdi]
mov edx, eax
add rdx, r15
mov r13, r9
mov r14, r8
xor r8d, r8d
xor r9d, r9d
call sub.KERNEL32.dll_SetFilePointerEx
test eax, eax
je 0x413320
mov qword [rsp + 0x30], rbx
test r13, r13
je 0x41330c
mov r12, qword [rdi]
xor r8d, r8d
mov rbx, r13
mov rbp, r14
mov qword [rsp + 0x40], r14
mov eax, dword [rdi + 0x20]
sub rax, r15
jb 0x413385
cmp rax, rbx
mov r14, r13
mov r13, rbx
mov ebx, 0xffffffff
mov qword [rsp + 0x38], r8
cmovb r13, rax
mov eax, 0xffffffff
cmp r13, rax
cmovb rbx, r13
nop dword [rax]
lea r9, [rsp + 0x2c]
mov dword [rsp + 0x2c], 0xaaaaaaaa
mov qword [rsp + 0x20], 0
mov rcx, r12
mov rdx, rbp
mov r8d, ebx
call sub.KERNEL32.dll_ReadFile
test eax, eax
jne 0x413266
call sub.KERNEL32.dll_GetLastError
movzx eax, ax
cmp eax, 0x3e3
je 0x413200
cmp eax, 0x6c
jg 0x41324c
mov r8, qword [rsp + 0x38]
cmp eax, 0x26
jne 0x413339
jmp 0x41325a
mov r8, qword [rsp + 0x38]
cmp eax, 0x6d
jne 0x41336a
xor eax, eax
add r8, rax
jae 0x413278
jmp 0x413385
mov eax, dword [rsp + 0x2c]
mov r8, qword [rsp + 0x38]
add r8, rax
jb 0x413385
mov rbx, r14
sub rbx, r8
jb 0x4133c1
add r15, r13
jb 0x413385
mov eax, dword [rdi + 0x20]
mov r13, r14
cmp r15, rax
jne 0x4132fa
mov rcx, qword [rsp + 0x30]
mov r14, qword [rsp + 0x40]
inc rcx
je 0x413385
mov rdx, rcx
mov qword [rsp + 0x30], rcx
cmp rcx, qword [rdi + 0x18]
jae 0x41330c
mov rcx, qword [rdi + 0x10]
mov rdx, qword [rsp + 0x30]
mul dword [rcx + rdx*4]
jo 0x413385
mov rcx, qword [rdi]
mov rbp, r8
mov edx, eax
xor r8d, r8d
xor r9d, r9d
call sub.KERNEL32.dll_SetFilePointerEx
mov r15d, 0
mov r8, rbp
test eax, eax
je 0x413320
lea rbp, [r14 + r8]
cmp r13, r8
ja 0x4131ca
jmp 0x41330c
mov r14, qword [rsp + 0x40]
lea rbp, [r14 + r8]
cmp r13, r8
ja 0x4131ca
mov rax, qword [rdi + 8]
add rax, r13
jb 0x413385
mov qword [rdi + 8], rax
xor eax, eax
mov rdx, r13
jmp 0x413342
call sub.KERNEL32.dll_GetLastError
cmp ax, 6
je 0x413371
movzx eax, ax
cmp eax, 0x57
je 0x413371
mov ax, 0x10
jmp 0x413342
cmp eax, 0x40
jne 0x413333
mov ax, 0x23
mov qword [rsi], rdx
mov word [rsi + 8], ax
mov dword [rsi + 0xa], 0
mov word [rsi + 0xe], 0
mov rax, rsi
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
cmp eax, 0x3e5
jne 0x413333
lea rcx, [0x0045177e]
mov edx, 0x18
xor r9d, r9d
call fcn.00401000
lea rcx, str.integer_overflow
mov edx, 0x10
xor r9d, r9d
call fcn.00401000
lea rcx, str.incorrect_alignment
mov edx, 0x13
xor r9d, r9d
call fcn.00401000
lea rcx, str.division_by_zero
mov edx, 0x10
xor r9d, r9d
call fcn.00401000
lea rcx, str.start_index_is_larger_than_end_index
mov edx, 0x24
xor r9d, r9d
call fcn.00401000
int3
Function at 0x430230
Capabilities:
Get file attributes

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x278
vmovaps xmmword [rsp + 0x260], xmm6
vbroadcastss xmm6, dword [0x00451470]
mov rdi, qword [rcx]
movabs r14, 0xaaaaaaaaaaaaaaaa
lea rdx, [rsp + 0x30]
lea r8, [rsp + 0x28]
mov r9d, 8
mov dword [rsp + 0x20], 4
mov qword [rsp + 0x28], r14
mov rcx, rdi
vmovaps xmmword [rsp + 0x30], xmm6
call sub.ntdll.dll_NtQueryVolumeInformationFile
xor esi, esi
test eax, eax
jne 0x4303ec
cmp dword [rsp + 0x28], 0x11
jne 0x4303ec
lea rbx, [rsp + 0x54]
mov r8d, 0x20c
xor esi, esi
xor edx, edx
mov rcx, rbx
call fcn.0044c710
lea rdx, [rsp + 0x40]
mov r9d, 0x20c
vmovaps xmmword [rsp + 0x40], xmm6
mov dword [rsp + 0x20], 9
mov rcx, rdi
mov r8, rbx
call sub.ntdll.dll_NtQueryInformationFile
test eax, eax
je 0x4302f9
cmp eax, 0xc000000d
jne 0x4303ec
lea rcx, [0x0045177e]
mov edx, 0x18
xor r9d, r9d
call fcn.00401000
mov eax, dword [rsp + 0x54]
add eax, 4
jb 0x430418
cmp eax, 0x20d
jae 0x430404
mov ecx, eax
mov rax, rcx
add rax, 0xfffffffffffffffc
je 0x430338
test cl, 1
jne 0x43042c
lea r14, [rsp + 0x58]
shr rax, 1
cmp rax, 6
jae 0x430344
jmp 0x4303ea
xor eax, eax
cmp rax, 6
jb 0x4303ea
lea rcx, str.msys_cygwin__pty
cmp r14, rcx
je 0x43037c
vmovq xmm0, qword [r14]
mov ecx, dword [r14 + 8]
vpcmpeqd xmm1, xmm0, xmmword [str.msy]
vpmovsxdq xmm1, xmm1
vmovmskpd edx, xmm1
test dl, 2
je 0x4303bc
cmp ecx, 0x2d0073
jne 0x4303bc
test dl, 1
je 0x4303bc
add rax, 0xfffffffffffffffd
lea rcx, [0x00482da0]
jmp 0x430399
add r14, 2
test rax, rax
je 0x4303ea
sub rax, 1
jb 0x430404
mov sil, 1
cmp r14, rcx
je 0x4303ec
cmp dword [r14], 0x70002d
jne 0x430390
cmp dword [r14 + 4], 0x790074
jne 0x430390
jmp 0x4303ec
cmp rax, 8
jb 0x4303ea
lea rdx, [0x00482d90]
cmp r14, rdx
je 0x43037c
vpinsrd xmm0, xmm0, ecx, 2
vpinsrd xmm0, xmm0, dword [r14 + 0xc], 3
vpxor xmm0, xmm0, xmmword [str.cygwin_]
vptest xmm0, xmm0
je 0x43037c
xor esi, esi
vmovaps xmm6, xmmword [rsp + 0x260]
mov eax, esi
add rsp, 0x278
pop rbx
pop rdi
pop rsi
pop r14
ret
lea rcx, str.index_out_of_bounds
mov edx, 0x13
xor r9d, r9d
call fcn.00401000
lea rcx, str.integer_overflow
mov edx, 0x10
xor r9d, r9d
call fcn.00401000
lea rcx, str.exact_division_produced_remainder
mov edx, 0x21
xor r9d, r9d
call fcn.00401000
int3