joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140057d20
Capabilities:
Create restart manager session
Enumerate processes that use resource

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
lea rbp, [rsp - 0x57]
sub rsp, 0xd0
mov rax, qword [0x1400c5be0]
xor rax, rsp
mov qword [rbp + 0x47], rax
mov qword [rbp - 0x31], rcx
xor ebx, ebx
mov dword [rbp - 0x21], ebx
mov edx, 4
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
mov eax, dword [rdx + rcx]
cmp dword [0x1400c90d8], eax
jle 0x140057da5
lea rcx, [0x1400c90d8]
call fcn.14008d170
cmp dword [0x1400c90d8], 0xffffffff
jne 0x140057da5
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcessId]
mov dword [0x1400c90e8], eax
lea rcx, [0x1400c90d8]
call fcn.14008d104
lea rdi, [rbp - 9]
xor eax, eax
mov ecx, 0x42
rep stosb byte [rdi], al
lea r8, [rbp - 9]
xor edx, edx
lea rcx, [rbp - 0x21]
call qword [sym.imp.RstrtMgr.DLL_RmStartSession]
test eax, eax
jne 0x140057ec2
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rbx
xor r9d, r9d
lea r8, [rbp - 0x31]
lea edx, [rax + 1]
mov ecx, dword [rbp - 0x21]
call qword [sym.imp.RstrtMgr.DLL_RmRegisterResources]
test eax, eax
jne 0x140057eb9
mov dword [rbp - 0x19], ebx
mov dword [rbp - 0x39], ebx
mov dword [rbp - 0x1d], ebx
lea rdi, [rbp - 0x29]
mov ecx, 8
rep stosb byte [rdi], al
lea rax, [rbp - 0x19]
mov qword [rsp + 0x20], rax
xor r9d, r9d
lea r8, [rbp - 0x1d]
lea rdx, [rbp - 0x39]
mov ecx, dword [rbp - 0x21]
call qword [sym.imp.RstrtMgr.DLL_RmGetList]
cmp eax, 0xea
jne 0x140057f06
mov eax, dword [rbp - 0x39]
test eax, eax
je 0x140057f06
mov ecx, eax
mov eax, 0x29c
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.140078940
mov rsi, rax
mov ecx, dword [rbp - 0x21]
test rax, rax
je 0x140057f09
mov eax, dword [rbp - 0x39]
mov dword [rbp - 0x1d], eax
lea rax, [rbp - 0x19]
mov qword [rsp + 0x20], rax
mov r9, rsi
lea r8, [rbp - 0x1d]
lea rdx, [rbp - 0x39]
call qword [sym.imp.RstrtMgr.DLL_RmGetList]
test eax, eax
jne 0x140057efe
cmp dword [rbp - 0x39], eax
je 0x140057efe
mov edx, ebx
mov r8d, dword [rbp - 0x1d]
test r8d, r8d
je 0x140057eb9
mov r9d, dword [0x1400c90e8]
mov eax, edx
imul rcx, rax, 0x29c
mov edi, dword [rcx + rsi]
cmp edi, r9d
jne 0x140057ee9
inc edx
cmp edx, r8d
jb 0x140057ea1
mov ecx, dword [rbp - 0x21]
call qword [sym.imp.RstrtMgr.DLL_RmEndSession]
mov eax, ebx
mov rcx, qword [rbp + 0x47]
xor rcx, rsp
call fcn.14008d0a0
lea r11, [rsp + 0xd0]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret
mov rcx, rsi
call fcn.14006ee40
mov ecx, dword [rbp - 0x21]
call qword [sym.imp.RstrtMgr.DLL_RmEndSession]
mov ebx, edi
jmp 0x140057ec2
mov rcx, rsi
call fcn.14006ee40
mov ecx, dword [rbp - 0x21]
call qword [sym.imp.RstrtMgr.DLL_RmEndSession]
xor eax, eax
jmp 0x140057ec4
Function at 0x1400591c0
Capabilities:
Read file on windows

Disassembly:
push rbx
push rsi
push r14
sub rsp, 0x30
mov r14, r8
mov rsi, rdx
mov rbx, rcx
test r8, r8
jg 0x1400591e2
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbx
ret
cmp qword [rcx + 0x68], 0
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x20], rdi
je 0x14005925c
mov rdi, r14
mov rcx, rbx
call fcn.14003c100
test rax, rax
jle 0x140059234
cmp rdi, rax
mov rbp, rdi
mov rcx, rsi
cmovge rbp, rax
mov rax, qword [rbx + 0x38]
mov r8, rbp
mov rdx, qword [rax]
call fcn.14008f570
mov rax, qword [rbx + 0x50]
sub rdi, rbp
sub dword [rax], ebp
mov rcx, qword [rbx + 0x38]
movsxd rax, ebp
add qword [rcx], rax
jmp 0x14005924c
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x38]
cmp eax, 0xffffffff
je 0x140059254
mov byte [rsi], al
dec rdi
mov ebp, 1
add rsi, rbp
test rdi, rdi
jg 0x1400591f6
sub r14, rdi
jmp 0x14005933f
mov rax, qword [rcx + 0x38]
mov rbp, r14
mov rdx, qword [rax]
test rdx, rdx
je 0x140059273
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x140059275
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x1400592a7
cmp rax, r14
mov rdi, r14
mov rcx, rsi
cmovb rdi, rax
mov r8, rdi
call fcn.14008f570
mov rax, qword [rbx + 0x50]
add rsi, rdi
sub rbp, rdi
sub dword [rax], edi
mov rcx, qword [rbx + 0x38]
movsxd rax, edi
add qword [rcx], rax
cmp qword [rbx + 0x80], 0
je 0x14005933c
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x1400592e2
mov rcx, qword [rbx + 0x88]
mov rdx, qword [rbx + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rbx + 0x38]
mov qword [rax], rcx
mov rax, qword [rbx + 0x50]
mov dword [rax], edx
cmp rbp, 0xfff
jbe 0x14005931d
nop dword [rax + rax]
mov r9, qword [rbx + 0x80]
mov edx, 1
mov r8d, 0xfff
mov rcx, rsi
call fcn.1400784d4
add rsi, rax
sub rbp, rax
cmp rax, 0xfff
jne 0x14005933c
cmp rbp, rax
ja 0x1400592f0
test rbp, rbp
je 0x14005933c
mov r9, qword [rbx + 0x80]
mov r8, rbp
mov edx, 1
mov rcx, rsi
call fcn.1400784d4
sub rbp, rax
sub r14, rbp
mov rbp, qword [rsp + 0x28]
mov rax, r14
mov rdi, qword [rsp + 0x20]
add rsp, 0x30
pop r14
pop rsi
pop rbx
ret

Function at 0x14007c000
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x14007c016
mov al, 1
jmp 0x14007c076
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x14007c027
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x14007c074
mov ecx, dword [rcx + 0x18]
nop
call fcn.1400881e4
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x14007c074
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x14007c074
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x14007c074
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x14007c076
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x1400819c0
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.14008dd70
sub rsp, rax
mov rax, qword [0x1400c5be0]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.14007bee0
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x140081a0f
mov rax, rbp
jmp 0x140081b17
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, [0x140000000]
xor r8d, r8d
mov rdx, qword [rax + rbx*8 + 0xc6e50]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.1400833e0
mov r13, rax
lea rax, [0x140000000]
mov rcx, qword [rax + rbx*8 + 0xc6e50]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x140081b13
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 0x140081b13
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.1400833e0
test rax, rax
js 0x140081b13
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x140081b13
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x140081b05
lea r8, [0x140000000]
cmp rcx, rdx
jae 0x140081b05
cmp byte [rcx], 0xd
jne 0x140081aeb
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x140081afa
cmp byte [rcx + 1], 0xa
jne 0x140081afa
inc rcx
jmp 0x140081afa
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0xc5560]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x140081acd
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x140081b17
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.14008d0a0
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 0x140082780
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, [0x1400c6e50]
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 0x1400827d7
cmp word [rdx], r13w
jne 0x1400827d7
or byte [rax + rdi*8 + 0x38], cl
jmp 0x1400827dc
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x140082901
mov r11d, recv
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x140082922
lea r9, [rdx + 2]
cmp cx, r11w
je 0x140082815
mov rdx, r9
mov word [rbx], cx
jmp 0x14008283c
cmp r9, r8
jae 0x14008284c
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 0x1400827f6
jmp 0x140082901
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 0x1400828f6
cmp dword [rsp + 0x80], esi
je 0x1400828f6
lea r8, [0x1400c6e50]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x1400828ce
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x14008289e
mov word [rbx], r13w
jmp 0x1400828fe
mov ecx, recv
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 0x1400828ab
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x1400828fe
cmp word [rsp + 0x70], r13w
jne 0x1400828db
cmp rbx, r14
je 0x140082898
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.1400833e8
cmp word [rsp + 0x70], r13w
je 0x140082901
mov ecx, recv
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, [0x1400c6e50]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x1400828fb
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x140082901
Function at 0x1400835b8
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 0x140083627
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140083627
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140083627
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140083627
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140083627
cmp dword [rcx + 0x84], 0xe
jbe 0x140083627
cmp dword [rcx + 0xf8], 0
je 0x140083627
mov ecx, ebx
call fcn.1400836d8
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.1400834b4
nop
cmp dword [rbp + 0x20], 0
je 0x140083675
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.140083680
int3
xor r8d, r8d
lea edx, [r8 + 2]
jmp 0x1400835b8

Function at 0x1400837bc
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x1400835b8

Function at 0x1400876e4
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.140078d54
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 0x140087785
cmp ebx, dword [rsp + 0x30]
je 0x14008777e
test esi, esi
je 0x14008777e
mov r10, qword [rdi + 0x98]
mov r9d, edx
movzx r8d, word [r10]
lea rcx, [r10 + 2]
lea eax, [r8 - 0x41]
cmp ax, 0x19
jbe 0x140087759
sub r8w, 0x61
cmp r8w, 0x19
ja 0x140087766
movzx r8d, word [rcx]
inc r9d
add rcx, 2
jmp 0x140087743
or rax, 0xffffffffffffffff
inc rax
cmp word [r10 + rax*2], dx
jne 0x14008776a
cmp r9d, eax
setne dl
mov eax, edx
jmp 0x140087787
mov eax, 1
jmp 0x140087787
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x14008c060
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 0x14008c0e7
mov rsi, rbx
cmp word [rax], bp
je 0x14008c0a6
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x14008c090
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x14008c08c
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.14007b5ac
mov rdi, rax
test rax, rax
je 0x14008c0d4
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.14008f570
mov rbp, rdi
xor ecx, ecx
call fcn.140078948
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 0x14008dc18
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14008dc62
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14008dc62
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14008dc62
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14008dc62
cmp dword [rcx + 0x84], 0xe
jbe 0x14008dc62
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x14008dc64
xor al, al
add rsp, 0x28
ret

Function at 0x140093924
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x40
mov rdi, rdx
lea r8, [rsp + 0x60]
mov ebx, ecx
mov edx, 0x20000001
lea rcx, str._x_sys_default_locale
mov r9d, 2
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
mov r8d, ebx
mov ecx, 0x1300
neg eax
sbb r9d, r9d
and qword [rsp + 0x30], 0
and r9d, dword [rsp + 0x60]
xor edx, edx
and dword [rsp + 0x28], 0
mov dword [rsp + 0x60], r9d
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, eax
test eax, eax
je 0x1400939a8
mov r8, qword [rdi]
dec r8
add r8, rdx
movzx ecx, byte [r8]
lea rax, [0x1400af4b0]
cmp byte [rcx + rax], 0
je 0x1400939a8
dec r8
sub rdx, 1
jne 0x14009398e
mov rbx, qword [rsp + 0x50]
mov rax, rdx
add rsp, 0x40
pop rdi
ret
Function at 0x140098034
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.1400833e8
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.1400833e8
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x140098184
cmp rax, 0xffffffffffffffff
je 0x140098184
xor edi, edi
test rbp, rbp
jle 0x14009812f
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.14007c3bc
mov rbx, rax
test rax, rax
jne 0x1400980bc
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x140098125
mov edx, 0x8000
mov ecx, r14d
call fcn.140095a04
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.14007e0cc
cmp eax, 0xffffffff
je 0x140098105
cdqe
sub rbp, rax
test rbp, rbp
jg 0x1400980cc
mov edx, r15d
mov ecx, r14d
call fcn.140095a04
jmp 0x140098125
cmp byte [rsi + 0x38], dil
je 0x14009811c
cmp dword [rsi + 0x34], 5
jne 0x14009811c
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], send
cmp byte [rsi + 0x30], dil
je 0x140098125
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.140078948
jmp 0x140098198
jns 0x140098198
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.1400833e8
cmp rax, 0xffffffffffffffff
jne 0x140098150
cmp byte [rsi + 0x30], dil
je 0x140098198
mov edi, dword [rsi + 0x2c]
jmp 0x140098198
mov ecx, r14d
call fcn.1400881e4
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x140098198
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, recv
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], send
jmp 0x140098198
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x140098191
mov eax, dword [rsi + 0x2c]
jmp 0x140098196
mov eax, socket
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.1400833e8
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 0x140098270
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140098298
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x140098298
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x140004440]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x140004450]
mov dword [rax], 1
mov rax, qword [0x140004460]
mov dword [rax], 1
mov rax, qword [0x1400043f0]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x140004430]
mov dword [0x14000800c], ecx
mov eax, dword [rax]
test eax, eax
je 0x1400010b0
mov ecx, 2
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x140004500]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x1400044e0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x1400043a0]
cmp dword [rax], 1
je 0x1400010f8
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x140001077
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001110
cmp dx, 0x20b
jne 0x14000105a
cmp dword [rax + 0x84], 0xe
jbe 0x14000105a
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x14000105a
mov rcx, qword [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x14000105a
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x14000105a

Function at 0x140001830
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, 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 rsi, qword [rsp + 0x28]
mov ecx, 2
call dbg.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop dword [rax]
Function at 0x1400018a0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140008104]
mov rbx, rcx
test esi, esi
jle 0x1400019d0
mov rax, qword [0x140008108]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x1400018eb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140001975
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x1400018d0
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x1400019f2
mov rax, qword [0x140008108]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call dbg._GetPEImageBase
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x140008108]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x1400019d7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14000196e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140001980
add dword [0x140008104], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x140008108]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14000196e
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 esi, esi
jmp 0x1400018f8
mov rax, qword [0x140008108]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call dbg.__report_error
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140001f60
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140008160]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140008140]
test rbx, rbx
je 0x140001fbc
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x140001fb3
test rsi, rsi
je 0x140001fb3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140001f98
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x1400021d0
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x1400021e8
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x1400021f0
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret