joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1800196d0
Capabilities:
Encode data using xor

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 r15
sub rsp, 0x40
mov qword [0x18004ea60], rcx
mov ebx, 0x400
mov ecx, ebx
call fcn.18001a7a4
mov r8d, ebx
xor edx, edx
mov rcx, rax
mov qword [0x18004ea68], rax
call fcn.18001aa50
xor r15d, r15d
lea rbp, str.ihihikiiikihikNfijikimii
mov eax, r15d
xor byte [rax + rbp], 0x69
inc rax
cmp rax, 0x1000
jl 0x18001971d
lea rcx, [rsp + 0x20]
mov r8d, 0x1000
mov rdx, rbp
call fcn.18001590c
jmp 0x1800197ea
lea rcx, [rsp + 0x20]
call fcn.180015978
lea rcx, [rsp + 0x20]
movsx ebx, ax
call fcn.180015978
mov rcx, qword [0x18004ea68]
movsx rdi, di
mov edx, ebx
movzx esi, ax
shl rdi, 4
mov word [rdi + rcx], bx
dec edx
je 0x1800197d4
dec edx
je 0x1800197bd
dec edx
jne 0x1800197ea
movsx rbx, ax
mov rcx, rbx
call fcn.18001a7a4
mov rdx, qword [0x18004ea68]
lea rcx, [rsp + 0x20]
mov qword [rdi + rdx + 8], rax
movsx edx, si
call fcn.180015950
mov rcx, qword [0x18004ea68]
mov r8, rbx
mov rcx, qword [rdi + rcx + 8]
mov rdx, rax
call fcn.18001b0b0
jmp 0x1800197ea
lea rcx, [rsp + 0x20]
call fcn.18001591c
mov rcx, qword [0x18004ea68]
mov dword [rdi + rcx + 8], eax
jmp 0x1800197ea
lea rcx, [rsp + 0x20]
call fcn.180015978
mov rdx, qword [0x18004ea68]
mov word [rdi + rdx + 8], ax
lea rcx, [rsp + 0x20]
call fcn.180015978
movzx edi, ax
test ax, ax
jg 0x180019744
xor edx, edx
mov r8d, 0x1000
mov rcx, rbp
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r15
jmp fcn.18001aa50

Function at 0x180019b64
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push r14
sub rsp, 0x30
or rsi, 0xffffffffffffffff
mov rdi, rdx
mov rbx, rcx
lea edx, [rsi + 0x19]
lea r9d, [rsi + 5]
xor ecx, ecx
mov r8d, 0x3000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r14, rax
mov qword [rax], rbx
mov qword [rax + 8], rdi
mov rax, qword [sym.imp.KERNEL32.dll_VirtualFree]
mov qword [r14 + 0x10], rax
call fcn.180019cac
mov r8, qword [0x18004a798]
test r8, r8
je 0x180019bd9
and qword [rsp + 0x28], 0
and dword [rsp + 0x20], 0
mov r9, r14
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rsi, rax
mov rbx, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x50]
mov rax, rsi
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop r14
ret

Function at 0x180019bf4
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x30
mov esi, 1
mov rdi, rcx
mov rbx, rdx
add dword [0x18004a790], esi
lea ecx, [rsi + 0x26]
call fcn.1800196a0
cmp ax, si
jne 0x180019c2e
mov rdx, rbx
mov rcx, rdi
call fcn.180019b64
jmp 0x180019c49
and qword [rsp + 0x28], 0
and dword [rsp + 0x20], 0
mov r9, rbx
mov r8, rdi
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
Function at 0x180019c5c
Capabilities:
Create thread
Terminate process

Disassembly:
sub rsp, 0x38
mov ecx, 0x27
call fcn.1800196a0
cmp ax, 1
jne 0x180019ca0
mov r8, qword [sym.imp.KERNEL32.dll_ExitProcess]
and qword [rsp + 0x28], 0
and dword [rsp + 0x20], 0
xor r9d, r9d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
or edx, 0xffffffff
mov rcx, rax
add rsp, 0x38
jmp qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x18001a084
Capabilities:
Get token membership

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x80
mov rax, qword [0x18003f040]
xor rax, rsp
mov qword [rbp - 8], rax
lea rax, [rbp - 0x18]
lea rcx, [rbp - 0x10]
mov r9d, 0x220
mov qword [rsp + 0x50], rax
and dword [rsp + 0x48], 0
and dword [rsp + 0x40], 0
and dword [rsp + 0x38], 0
and dword [rsp + 0x30], 0
and dword [rsp + 0x28], 0
and dword [rsp + 0x20], 0
mov r8d, 0x20
mov dl, 2
mov dword [rbp - 0x10], 0
mov word [rbp - 0xc], 0x500
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
mov dword [rbp - 0x20], eax
test eax, eax
je 0x18001a115
mov rdx, qword [rbp - 0x18]
lea r8, [rbp - 0x20]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
neg eax
sbb ecx, ecx
and dword [rbp - 0x20], ecx
mov rcx, qword [rbp - 0x18]
call qword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, dword [rbp - 0x20]
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.18001b630
add rsp, 0x80
pop rbp
ret

Function at 0x18001a12c
Capabilities:
Impersonate user

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x30
mov rbp, r9
mov rdi, r8
mov rbx, rdx
mov rsi, rcx
call fcn.180019ea8
lea rax, [0x18004a7a0]
mov qword [rsp + 0x28], rax
mov r9d, 9
mov r8, rdi
mov rdx, rsi
mov rcx, rbx
mov dword [rsp + 0x20], 3
call qword [sym.imp.ADVAPI32.dll_LogonUserA]
test eax, eax
jne 0x18001a195
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x18
mov edx, eax
call fcn.18000d50c
jmp 0x18001a282
mov rcx, qword [0x18004a7a0]
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
jne 0x18001a1b3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x19
jmp 0x18001a189
mov ecx, 0x800
call fcn.180015838
mov edx, 0x200
mov rcx, rax
mov qword [0x18004a7c0], rax
call fcn.180015950
mov rcx, qword [0x18004a7c0]
mov edx, 0x200
mov qword [0x18004a7a8], rax
call fcn.180015950
mov rcx, qword [0x18004a7c0]
mov edx, 0x400
mov qword [0x18004a7b0], rax
call fcn.180015950
mov rdx, qword [0x18004a7b0]
mov r8d, 0x100
mov rcx, rbx
mov qword [0x18004a7b8], rax
call fcn.180010800
mov rdx, qword [0x18004a7a8]
mov r8d, 0x100
mov rcx, rsi
call fcn.180010800
mov rdx, qword [0x18004a7b8]
mov r8d, 0x200
mov rcx, rdi
call fcn.180010800
mov rcx, qword [0x18004a7a0]
mov r8d, 0x400
mov rdx, rbx
mov dword [0x18004a7c8], 1
call fcn.18001a2f8
test eax, eax
je 0x18001a282
or rdx, 0xffffffffffffffff
inc rdx
cmp byte [rbx + rdx], 0
jne 0x18001a26e
mov r8d, reloc.WS2_32.dll_ntohs
mov rcx, rbx
call rbp
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret
Function at 0x18001a480
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
xor ebx, ebx
mov esi, r8d
mov rdi, rdx
mov rbp, rcx
test r8d, r8d
je 0x18001a4da
xor r9d, r9d
mov edx, ebx
mov rcx, rbp
lea r8d, [r9 + 1]
add rdx, rdi
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x18001a4da
add ebx, eax
cmp ebx, 2
jb 0x18001a4d6
lea eax, [rbx - 1]
cmp byte [rax + rdi], 0xa
jne 0x18001a4d6
lea eax, [rbx - 2]
cmp byte [rax + rdi], 0xd
je 0x18001a4f2
cmp ebx, esi
jb 0x18001a4a4
or eax, 0xffffffff
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
lea ecx, [rbx - 2]
mov eax, ebx
mov byte [rcx + rdi], 0
jmp 0x18001a4dd

Function at 0x18001be94
Capabilities:
Terminate process

Disassembly:
xor r8d, r8d
xor edx, edx
jmp fcn.18001bcfc

Function at 0x180023460
Capabilities:
Delete file

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x180023476
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x180023478
xor eax, eax
test eax, eax
je 0x180023488
mov ecx, eax
call fcn.18001cf50
or eax, 0xffffffff
jmp 0x18002348a
xor eax, eax
add rsp, 0x28
ret

Function at 0x180023490
Capabilities:
Create directory

Disassembly:
sub rsp, 0x28
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x1800234a8
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1800234aa
xor eax, eax
test eax, eax
je 0x1800234ba
mov ecx, eax
call fcn.18001cf50
or eax, 0xffffffff
jmp 0x1800234bc
xor eax, eax
add rsp, 0x28
ret

Function at 0x1800234c4
Capabilities:
Delete directory

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x1800234da
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1800234dc
xor eax, eax
test eax, eax
je 0x1800234ec
mov ecx, eax
call fcn.18001cf50
or eax, 0xffffffff
jmp 0x1800234ee
xor eax, eax
add rsp, 0x28
ret
Function at 0x18001a940
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 0x18001a970
xor eax, eax
jmp 0x18001aa33
mov rbp, rbx
cmp word [rax], si
je 0x18001a995
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x18001a97c
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x18001a978
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.180015d74
movsxd r14, eax
test eax, eax
jne 0x18001a9d3
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x18001a969
mov rcx, r14
call fcn.180015cb8
mov rdi, rax
test rax, rax
jne 0x18001a9ec
xor ecx, ecx
call fcn.180014b5c
jmp 0x18001a9c8
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.180015d74
test eax, eax
jne 0x18001aa1d
mov rcx, rdi
call fcn.180014b5c
jmp 0x18001aa27
xor ecx, ecx
call fcn.180014b5c
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 0x18001aa50
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 0x18001aad7
mov rsi, rbx
cmp word [rax], bp
je 0x18001aa96
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x18001aa80
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x18001aa7c
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.180015cb8
mov rdi, rax
test rax, rax
je 0x18001aac4
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.180010340
mov rbp, rdi
xor ecx, ecx
call fcn.180014b5c
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 0x18001d4a8
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, [0x180030f90]
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 0x18001d506
cmp word [rdx], r12w
jne 0x18001d506
or byte [rax + r8*8 + 0x38], cl
jmp 0x18001d50c
and byte [rax + r8*8 + 0x38], 0xfb
lea rdx, [rdx + r9*2]
mov rcx, rsi
mov rbx, rsi
cmp rsi, rdx
jae 0x18001d667
mov r9d, 0x1a
lea r13d, [r9 - 0xd]
movzx eax, word [rcx]
cmp ax, r9w
je 0x18001d642
lea r9, [rcx + 2]
cmp ax, r13w
je 0x18001d545
mov rcx, r9
jmp 0x18001d568
cmp r9, rdx
jae 0x18001d57f
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 0x18001d529
jmp 0x18001d667
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 0x18001d63c
cmp dword [rsp + 0x80], edi
je 0x18001d63c
mov rdx, r14
lea r11, [0x180030f90]
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 0x18001d615
movzx eax, word [rsp + 0x70]
cmp ax, r12w
jne 0x18001d5e8
mov word [rbx], r12w
jmp 0x18001d663
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 0x18001d5f1
mov rax, qword [r11 + rdx*8]
mov byte [rax + r8*8 + 0x3c], r12b
jmp 0x18001d663
cmp word [rsp + 0x70], r12w
jne 0x18001d622
cmp rbx, rsi
je 0x18001d5e2
mov rdx, 0xfffffffffffffffe
mov ecx, ebp
lea r8d, [rdx + 3]
call fcn.18001d1e0
cmp word [rsp + 0x70], r12w
je 0x18001d667
mov word [rbx], r13w
jmp 0x18001d663
lea r11, [0x180030f90]
mov rcx, qword [r11 + r10*8]
mov al, byte [rcx + r8*8 + 0x38]
test al, 0x40
jne 0x18001d65f
or al, 2
mov byte [rcx + r8*8 + 0x38], al
jmp 0x18001d667
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 0x180020128
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.18001d1e0
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.18001d1e0
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x180020278
cmp rax, 0xffffffffffffffff
je 0x180020278
xor edi, edi
test rbp, rbp
jle 0x180020223
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.180019294
mov rbx, rax
test rax, rax
jne 0x1800201b0
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x180020219
mov edx, 0x8000
mov ecx, r14d
call fcn.18001ffb0
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.1800180ac
cmp eax, 0xffffffff
je 0x1800201f9
cdqe
sub rbp, rax
test rbp, rbp
jg 0x1800201c0
mov edx, r15d
mov ecx, r14d
call fcn.18001ffb0
jmp 0x180020219
cmp byte [rsi + 0x38], dil
je 0x180020210
cmp dword [rsi + 0x34], 5
jne 0x180020210
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x180020219
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.180014b5c
jmp 0x18002028c
jns 0x18002028c
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.18001d1e0
cmp rax, 0xffffffffffffffff
jne 0x180020244
cmp byte [rsi + 0x30], dil
je 0x18002028c
mov edi, dword [rsi + 0x2c]
jmp 0x18002028c
mov ecx, r14d
call fcn.18001c364
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x18002028c
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 0x18002028c
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x180020285
mov eax, dword [rsi + 0x2c]
jmp 0x18002028a
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.18001d1e0
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 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x00404510]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x00404520]
mov dword [rax], 1
mov rax, qword [0x00404530]
mov dword [rax], 1
mov rax, qword [0x00404500]
mov dword [rax], 1
mov rax, qword [0x004043f0]
cmp word [rax], 0x5a4d
jne 0x401067
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x4010c0
mov rax, qword [0x004044f0]
mov dword [0x0040700c], ecx
mov eax, dword [rax]
test eax, eax
jne 0x4010b0
mov ecx, 1
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x004044b0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x004043a0]
cmp dword [rax], 1
je 0x4010f0
xor eax, eax
add rsp, 0x28
ret
mov ecx, 2
call sym.__set_app_type
jmp 0x401084
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x401108
cmp dx, 0x20b
jne 0x401067
cmp dword [rax + 0x84], 0xe
jbe 0x401067
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x401067
lea rcx, [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x401067
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x401067
Function at 0x401560
Capabilities:
Read file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x70
call dbg.__main
movabs rax, 0x6f646e69775c3a43
movabs rdx, 0x5c6e6e75525c7377
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], rdx
mov dword [rbp - 0x40], 0x69622e31
mov word [rbp - 0x3c], 0x6e
lea rax, [rbp - 0x50]
lea rdx, section..rdata
mov rcx, rax
call sym.fopen
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x4015ca
lea rcx, str.fopen
call sym.perror
mov ecx, 1
call sym.exit
mov rax, qword [rbp - 8]
mov r8d, 2
mov edx, 0
mov rcx, rax
call sym.fseek
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.ftell
mov dword [rbp - 0xc], eax
mov rax, qword [rbp - 8]
mov r8d, 0
mov edx, 0
mov rcx, rax
call sym.fseek
mov eax, dword [rbp - 0xc]
cdqe
mov rcx, rax
call sym.malloc
mov qword [rbp - 0x18], rax
cmp qword [rbp - 0x18], 0
jne 0x401641
lea rcx, str.malloc
call sym.perror
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.fclose
mov ecx, 1
call sym.exit
mov eax, dword [rbp - 0xc]
movsxd rdx, eax
mov rcx, qword [rbp - 8]
mov rax, qword [rbp - 0x18]
mov r9, rcx
mov r8, rdx
mov edx, 1
mov rcx, rax
call sym.fread
mov edx, dword [rbp - 0xc]
movsxd rdx, edx
cmp rax, rdx
setne al
test al, al
je 0x4016a0
lea rcx, str.fread
call sym.perror
mov rax, qword [rbp - 0x18]
mov rcx, rax
call sym.free
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.fclose
mov ecx, 1
call sym.exit
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.fclose
lea rcx, str.kernel32.dll
mov rax, qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call rax
mov qword [rbp - 0x20], rax
cmp qword [rbp - 0x20], 0
jne 0x4016e9
lea rcx, str.GetModuleHandleA
call sym.perror
mov rax, qword [rbp - 0x18]
mov rcx, rax
call sym.free
mov ecx, 1
call sym.exit
mov rax, qword [rbp - 0x20]
lea rdx, str.VirtualAlloc
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [rbp - 0x28], rax
cmp qword [rbp - 0x28], 0
jne 0x40172d
lea rcx, str.GetProcAddress
call sym.perror
mov rax, qword [rbp - 0x18]
mov rcx, rax
call sym.free
mov ecx, 1
call sym.exit
mov eax, dword [rbp - 0xc]
cdqe
mov r10, qword [rbp - 0x28]
mov r9d, 0x40
mov r8d, 0x1000
mov rdx, rax
mov ecx, 0
call r10
mov qword [rbp - 0x30], rax
cmp qword [rbp - 0x30], 0
jne 0x40177a
lea rcx, str.VirtualAlloc
call sym.perror
mov rax, qword [rbp - 0x18]
mov rcx, rax
call sym.free
mov ecx, 1
call sym.exit
mov eax, dword [rbp - 0xc]
movsxd rcx, eax
mov rdx, qword [rbp - 0x18]
mov rax, qword [rbp - 0x30]
mov r8, rcx
mov rcx, rax
call sym.memcpy
mov rax, qword [rbp - 0x30]
call rax
mov rax, qword [rbp - 0x20]
lea rdx, str.VirtualFree
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [rbp - 0x38], rax
mov rax, qword [rbp - 0x30]
mov r9, qword [rbp - 0x38]
mov r8d, 0x8000
mov edx, 0
mov rcx, rax
call r9
mov rax, qword [rbp - 0x18]
mov rcx, rax
call sym.free
mov eax, 0
add rsp, 0x70
pop rbp
ret
Function at 0x401ca0
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 dbg.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call dbg.__acrt_iob_func
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sym.vfprintf
call sym.abort
nop
nop word [rax + rax]

Function at 0x401d10
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x00407614]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x401eb8
mov rax, qword [0x00407618]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x401d5c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x401de7
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x401d40
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
je 0x401ef2
mov rax, qword [0x00407618]
lea rdi, [rdi + rdi*4]
shl rdi, 3
add rax, rdi
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call dbg._GetPEImageBase
mov ecx, dword [rbp + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x00407618]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x401f01
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x401de0
sub eax, 4
and eax, 0xfffffffb
jne 0x401e70
add dword [0x00407614], 1
cmp ebx, 8
jae 0x401e18
test bl, 4
jne 0x401ec0
test ebx, ebx
je 0x401e09
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x401ee0
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rax, qword [rsi]
lea rcx, [r12 + 8]
and rcx, 0xfffffffffffffff8
mov qword [r12], rax
mov eax, ebx
mov rdx, qword [rsi + rax - 8]
mov qword [r12 + rax - 8], rdx
sub r12, rcx
add ebx, r12d
sub rsi, r12
and ebx, 0xfffffff8
cmp ebx, 8
jb 0x401e09
and ebx, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov r8, qword [rsi + rdx]
mov qword [rcx + rdx], r8
cmp eax, ebx
jb 0x401e4a
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
add rdi, qword [0x00407618]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x401de0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
nop dword [rax]
xor edi, edi
jmp 0x401d67
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x401e09
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x401e09
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
mov rax, qword [0x00407618]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rdi + 0x18]
call dbg.__report_error
nop
nop dword [rax]