joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400b72d0
Capabilities:
Access the windows event log
Authenticate hmac
Clear windows event logs
Delete file
Enumerate processes
Hash data using fnv
Query environment variable
Resolve function by parsing pe exports
Self delete
Set console window title
Terminate process
Terminate process by name

Disassembly:
test word [rsp + 8], 0xcc0c
mov r8w, dx
cmovs r8w, dx
lea rbx, [rbx + 1]
push rbp
movabs rbp, 0x4d9e5d255b0da5b5
jae 0x140026170
push rbx
push rsi
or ebp, 0xb9a4032e
movsx r8d, byte [rsp + 0x19]
setle byte [rsp + 0x20]
call fcn.14013b3be
movabs rsi, 0xc905d32f663340be
lea rsi, [r9 + rsi*4 - 0x27c32873]
neg word [rsp + 0x28]
call fcn.14011f9ee
push rbp
call fcn.1401746dc
mov cs, word [rcx]
invalid
or word [rsp + 8], bp
movzx r8d, word [rsp + rdx - 0x5e816b04]
and ebp, 0x50378e39
test qword [rsp + rbp - 0x50058429], 0x7f86238c
mov qword [rsp + rdx - 0x5e816ad5], rbx
jns 0x14001a316
syscall
push r15
pushfq
movabs r15, 0x253615204e946b23
push r9
mov r15, qword [rsp + 0x10]
mov qword [rsp + 0x10], 0xffffffffd7cda11e
push qword [rsp + 8]
popfq
lea rsp, [rsp + 0x10]
call fcn.14021e057
jb fcn.14015e882
mov dword [rsp + 8], 0xe70aaf97
neg qword [rsp + 8]
jb 0x1401d9d7d
lea rbp, [rbp - 0x75d66adc]
ja 0x140011eda
test r9b, r10b
setne r9b
jne 0x14002337c
mov qword [rsp + 0x18], r10
movsx r10d, r9b
call fcn.140181f44
Function at 0x140160735
Capabilities:
Encrypt data using rc4 prga

Disassembly:
movabs rsi, 0x5b09cb25378afd17
push r10
mov r12, rsi
movabs r10, 0x1e8d249d1720e316
bswap r10
push r8
mov rsi, qword [rsp + 0x38]
mov rsi, qword [rsi]
cmp r10w, r12w
jne 0x1401c4ed6
movzx r12d, word [rsp + 0x4c]
jae 0x140129bf3
mov r12, qword [rsp + r12*2 + 0x90]
add qword [rsp + 8], 0xffffffffbfeda662
shr dword [rsp + 0x48], 0x93
not qword [rsp + 0x60]
cmp word [rsp + 0x48], 0x6236
sets byte [rsp + 0x48]
push qword [rsp + 0x98]
popfq
lea rsp, [rsp + 0xa8]
ret
shr qword [rsp + 0x48], 0xff
jbe 0x1401746d2
or byte [rbp - 0x48], dl
call rbp
invalid
pop rsi
push rbx
pushfq
movabs rbx, 0x7417cba5ca8e853a
cmp bl, 0xa
lea rbx, [rbx + rbx*8 - 0x4f4d92da]
mov bl, 0x3c
js 0x140020ad9
movabs rbx, 0xb123a8a17c0cea8e
xchg qword [rsp + 0x10], rsi
setne bl
call fcn.14012b367
or rcx, 0xffffffffb123f79c
test ch, cl
mov rcx, qword [rsp + rcx + 0x64c002b]
mov qword [rsp + 8], 0x7c4e341f
push qword [rsp]
popfq
lea rsp, [rsp + 8]
call fcn.1401f6419
rcr dword [rax + 0x6ba64f88], cl
push 0xffffffffffffff98
jg 0x140160806
invalid
out 0xb2, al
invalid

Function at 0x140188b43
Capabilities:
Authenticate hmac
Packed with generic packer

Disassembly:
push r12
pushfq
movabs r12, 0xcd83f6a403157e85
cmp r12, 0x6d86df30

Function at 0x1401a604d
Capabilities:
Encode data using xor

Disassembly:
push rdx
push r8
pushfq
add qword [rsp + 0x18], 0x12132
push rsi
movabs rsi, 0x463b8ab061a733b3
or esi, 0xf4841212
mov rdx, rsi
setb sil
sub dx, 0xe401
movabs rbx, 0x7c83df09faa5f2b4
mov rbx, qword [rsp + 0x20]
mov rbx, qword [rbx]
mov qword [rsp + 0x20], rsi
mov r8, qword [rsp + 0x20]
je 0x1401a60b1
and byte [rbx + rcx*4 + 0x44], cl
and al, 0x20
cmp r8b, byte [rsp + 0x20]
lea rbx, [rbx + 0x2b8ab501]
call fcn.140115dc1
js 0x1401a608b
push rbp
and eax, 0xe0a4b4e5
scasb al, byte [rdi]
shl dword [rcx - 0x737a817], 0xf8
jle 0x1401a6129
jmp 0x13913290d
xor ecx, eax
invalid
mov ch, 0x67
and byte [rsi - 0x5b13e99c], 0xb8
test dword [rbx], ebp
pop rsp
adc al, 0xd7
sub dl, byte [0xc2a2fb73]
cmpsb byte [rsi], byte [rdi]
invalid
cmc
jae 0x1401a60fa
adc al, 0xde
sbb eax, 0xa23ca2cf
insd dword [rdi], dx
and dl, ah
mov bh, 0xec
movsb byte [rdi], byte [rsi]
mov eax, 0xa2c9559a
scasd eax, dword [rdi]
outsd dx, dword [rsi]
or dh, byte [rdx + rbp*2 + 0x7e]
pop rdi
xor al, 0x17
in al, dx
movsb byte [rdi], byte [rsi]
mov eax, 0x6a011288
jo 0x1401a6139
invalid

Function at 0x1401b9829
Capabilities:
Create thread
Inject dll
Inject thread

Disassembly:
push rcx
seta r9b
mov rsi, qword [rsp + r9 - 0x79a1fec8]
mov rsi, qword [rsi + r9 - 0x79a1ff00]
mov qword [rsp + r9 - 0x79a1fec8], r9
js 0x140001267
add qword [rsp + r9 - 0x79a1fef8], 0xffffffffbfe2a43e
and dword [rsp + r9 - 0x79a1fec8], r9d
sub dword [rsp + r9 - 0x79a1fec8], 0xe4af10b7
not byte [rsp + r9 - 0x79a1fec8]
lea rsi, [rsi + r9 - 0x3cf232d4]

Function at 0x1401ba008
Capabilities:
Query environment variable
Self delete

Disassembly:
shl bpl, 0x9e
xor bp, bp
mov rdx, qword [rsp + 0x28]
cmp bp, 0x4007
call fcn.1400ece2b
Function at 0x1401ba02c
Capabilities:
Query environment variable
Self delete

Disassembly:
sub r9w, 0xbe03
jo 0x140005722
mov rbp, qword [rsp + 0x10]
mov rbp, qword [rbp + riz]
mov qword [rsp + 0x10], r9
ja 0x14012b36e
add r9b, byte [rsp + 0x13]
not word [rsp + 0x10]
call fcn.1401a77ee
neg edx
neg edx
cmp cx, dx
movzx ecx, word [rsp + 0x4b]
call fcn.14015f8e9

Function at 0x1401d9d71
Capabilities:
Access the windows event log
Authenticate hmac
Clear windows event logs
Delete file
Enumerate processes
Hash data using fnv
Query environment variable
Resolve function by parsing pe exports
Self delete
Set console window title
Terminate process
Terminate process by name

Disassembly:
mov word [rsp + 0x18], 0xbc27
call fcn.140178f27
Function at 0x140002614
Capabilities:
Parse pe header

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

Disassembly:
xor edx, edx
mov r10, qword [rcx]
mov r9, qword [rcx + 8]
sub r9, r10
je 0x40178a
cmp r9, 0xffffffffffffffff
mov rcx, qword [0x00410090]
mov r8, qword [0x00410098]
je 0x401760
or rax, 0xffffffffffffffff
xor edx, edx
div r9
not rdx
lea rax, [r8 + rcx]
xor r8, rcx
ror rcx, 9
mov r11, r8
xor rcx, r8
ror r8, 0x1c
shl r11, 0xe
xor rcx, r11
cmp rdx, rax
jb 0x401727
inc r9
xor edx, edx
mov qword [0x00410090], rcx
mov qword [0x00410098], r8
div r9
jmp 0x40178a
lea rdx, [rcx + r8]
xor r8, rcx
ror rcx, 9
mov rax, r8
xor rcx, r8
ror r8, 0x1c
shl rax, 0xe
mov qword [0x00410098], r8
xor rcx, rax
mov qword [0x00410090], rcx
lea rax, [r10 + rdx]
ret

Function at 0x401d17
Capabilities:
Write file on windows

Disassembly:
push rdi
push rbx
sub rsp, 0x28
xor r8d, r8d
test rdx, rdx
mov rbx, rcx
mov r10, rdx
je 0x401d40
mov rdi, rdx
or rcx, 0xffffffffffffffff
xor eax, eax
repne scasb al, byte [rdi]
mov rdx, rcx
not rdx
lea r8, [rdx - 1]
mov rcx, r10
mov r9, rbx
mov edx, 1
call sub.msvcrt.dll_fwrite
mov rcx, rbx
add rsp, 0x28
pop rbx
pop rdi
jmp fcn.004083c0

Function at 0x4049e5
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x148
mov byte [rsp + 0x2f], 1
mov al, byte [rsp + 0x2f]
mov rsi, rcx
mov qword [rsp + 0x168], rdx
test al, al
je 0x404a35
mov ecx, 2
call qword [fcn.00408490]
mov r8, qword [rsp + 0x168]
mov rcx, rsi
mov edx, 1
mov rbx, rax
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rcx, rbx
call fcn.004083c0
nop
add rsp, 0x148
pop rbx
pop rsi
ret
Function at 0x404b72
Capabilities:
Access peb ldr_data
Parse pe header
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xc8
lea r9, [rsp + 0x40]
mov rbx, rcx
mov r13, rdx
mov dword [rsp + 0x120], r8d
mov edx, pe_nt_image_headers64
mov rcx, r9
call fcn.00401a5d
test rbx, rbx
je 0x404df8
cmp word [rbx], 0x5a4d
jne 0x404df8
movsxd rsi, dword [rbx + 0x3c]
add rsi, rbx
cmp dword [rsi], 0x4550
jne 0x404df8
test byte [rsi + 0x17], 0x20
je 0x404df8
add rsi, 0x88
mov ecx, 0x20
mov rdi, r9
rep movsd dword [rdi], dword [rsi]
mov eax, dword [rsp + 0x44]
test eax, eax
mov dword [rsp + 0x20], eax
je 0x404df8
movsxd rbp, dword [rsp + 0x40]
test ebp, ebp
je 0x404df8
add rbp, rbx
movsxd r9, dword [rbp + 0x1c]
add r9, rbx
test r13, r13
je 0x404c3c
cmp qword [r13], 0
je 0x404c3c
mov eax, dword [rbp + 0x18]
mov r14, r9
mov dword [rsp + 0x2c], 0
mov r15d, dword [r9]
mov dword [rsp + 0x24], eax
movsxd rax, dword [rbp + 0x20]
mov eax, dword [rax + rbx]
mov dword [rsp + 0x28], eax
jmp 0x404cad
movsxd rax, dword [r9 - 4]
jmp 0x404d1a
movsxd r12, dword [rsp + 0x28]
lea r8, [0x0040c209]
xor edx, edx
add r12, rbx
mov rcx, r12
call qword [0x004121c0]
xor edx, edx
mov rcx, rax
call fcn.00401cf1
test al, al
je 0x404cbc
add r14, 4
movsxd rsi, dword [r14]
test r12, r12
mov ecx, 1
je 0x404c8b
or rcx, 0xffffffffffffffff
mov rdi, r12
xor eax, eax
repne scasb al, byte [rdi]
not ecx
add dword [rsp + 0x28], ecx
mov rcx, r13
call fcn.00401685
mov rdx, r12
mov rcx, rax
call fcn.00401cf1
test al, al
jne 0x404cc5
inc dword [rsp + 0x2c]
mov r15d, esi
mov edi, dword [rsp + 0x2c]
cmp dword [rsp + 0x24], edi
jge 0x404c45
jmp 0x404df8
inc dword [rsp + 0x24]
movsxd rsi, r15d
jmp 0x404c74
lea rcx, [0x0040d620]
mov edx, 0x534f5e9b
call fcn.00403ec0
mov edx, 0x40f1ee01
lea rcx, [0x0040d5e0]
call fcn.00403ec0
mov edx, 0x3dd9ab93
lea rcx, [0x0040d5c0]
call fcn.00403ec0
mov edx, 0x70a91869
lea rcx, [0x0040d580]
call fcn.00403ec0
cmp dword [rsp + 0x120], 0
lea rax, [rsi + rbx]
jne 0x404d1d
movsxd rax, r15d
add rax, rbx
test rax, rax
je 0x404df8
cmp rbp, rax
ja 0x404dfa
movsxd rdx, dword [rsp + 0x20]
add rbp, rdx
cmp rax, rbp
jae 0x404dfa
lea r12, [rsp + 0x30]
mov ebp, 0x10
mov qword [rsp + 0x30], rax
mov rsi, rax
mov rcx, r12
mov rdi, rbp
mov edx, 3
mov qword [rsp + 0x38], 0
sub rcx, rax
movsxd rcx, ecx
rep movsb byte [rdi], byte [rsi]
lea rcx, [0x00412180]
mov rdi, rbp
call fcn.00404b29
lea rcx, [rsp + 0x38]
mov rdx, rax
call fcn.00402f94
mov rsi, qword [rsp + 0x38]
mov ecx, 0x41
xor edx, edx
mov word [rsi + 0x10], 0x6c64
add rsi, 0x10
mov byte [rsi + 2], 0x6c
rep movsd dword [rdi], dword [rsi]
call fcn.00404e0e
test rax, rax
je 0x404dc0
xor r8d, r8d
mov rdx, r12
mov rcx, rax
call fcn.00404b72
jmp 0x404dfa
mov rax, qword gs:[0x60]
mov rax, qword [rax + 0x18]
mov rsi, qword [rax + 0x20]
lea rbp, [rax + 0x20]
cmp rbp, rsi
je 0x404df8
mov rcx, qword [rsi + 0x20]
cmp rbx, rcx
je 0x404df3
xor r8d, r8d
mov rdx, r12
call fcn.00404b72
test rax, rax
jne 0x404dfa
mov rsi, qword [rsi]
jmp 0x404dd5
xor eax, eax
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x404e0e
Capabilities:
Access peb ldr_data

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov rax, qword gs:[0x60]
mov rax, qword [rax + 0x18]
mov rbx, qword [rax + 0x20]
lea rbp, [rax + 0x20]
mov rdi, rcx
mov esi, edx
mov rdx, qword [rbx + 0x50]
mov rcx, rdi
call qword [0x004111e8]
test eax, eax
je 0x404e4b
mov rbx, qword [rbx]
cmp rbp, rbx
jne 0x404e30
jmp 0x404e51
mov rax, qword [rbx + 0x20]
jmp 0x404ecc
xor eax, eax
test esi, esi
je 0x404ecc
lea rcx, [0x0040c980]
call fcn.00403be7
xor edx, edx
mov rcx, rax
call fcn.00404e0e
mov r8d, 1
lea rdx, [0x0040c960]
mov rcx, rax
call fcn.00404b72
test rax, rax
mov rsi, rax
jne 0x404e8e
xor eax, eax
jmp 0x404ecc
lea rbx, [rsp + 0x30]
mov edx, 0x10
mov rcx, rbx
call fcn.00401a5d
mov rdx, rdi
mov rcx, rbx
mov qword [rsp + 0x28], 0
call qword [0x00411188]
xor edx, edx
xor ecx, ecx
mov r8, rbx
lea r9, [rsp + 0x28]
call rsi
test eax, eax
jne 0x404e8a
mov rax, qword [rsp + 0x28]
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret

Function at 0x4056a0
Capabilities:
Read file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x30
xor esi, esi
mov rdi, rcx
mov ecx, 0xfa0
call fcn.00403bb4
mov qword [rax], 0xfa0
lea r12, [rax + 0x10]
mov rbx, rax
mov r9, rdi
mov r8d, 0xfa0
mov edx, 1
mov rcx, r12
call sub.msvcrt.dll_fread
cmp rax, 0xfa0
mov rbp, rax
je 0x405716
mov rcx, rdi
call sub.msvcrt.dll_ferror
test eax, eax
je 0x4056fc
mov rcx, rdi
call fcn.004055e8
mov rdx, rbp
mov rcx, rbx
call fcn.00403f61
xor edx, edx
test rax, rax
mov rbx, rax
je 0x405731
mov rdx, qword [rbx]
jmp 0x405731
mov rdx, qword [rbx]
mov rcx, rsi
call fcn.00404414
mov rdx, rbx
mov rcx, rax
mov rsi, rax
call fcn.00401a3e
jmp 0x4056c7
mov rcx, rsi
call fcn.00404414
mov rdx, rbx
mov rcx, rax
mov qword [rsp + 0x28], rax
call fcn.00401a3e
mov rax, qword [rsp + 0x28]
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
Function at 0x405759
Capabilities:
Read file on windows

Disassembly:
push rbp
push r13
push r12
push rdi
push rsi
push rbx
mov rbp, rsp
sub rsp, 0x168
xor ebx, ebx
mov qword [rbp - 0x120], 0
mov rsi, rcx
call fcn.00401685
test rax, rax
mov r8, rax
je 0x4057a8
xor eax, eax
mov rdi, r8
or rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
mov rdx, rcx
mov rcx, r8
not rdx
lea rdx, [rdx - 1]
call fcn.00403c78
mov rbx, rax
lea rcx, [0x0040c22d]
mov edx, 3
call fcn.00403c78
mov rcx, rbx
mov rdx, rax
call qword [sym.imp.msvcrt.dll__wfopen]
test rax, rax
mov qword [rbp - 0x130], rax
jne 0x405814
lea rcx, [0x00410360]
mov edx, 0x30
call fcn.00403b62
test rsi, rsi
mov ecx, 0xd
mov rbx, rax
lea rax, [0x004103a0]
mov qword [rbx], rax
lea rax, str.IOError
mov qword [rbx + 0x10], rax
je 0x4059d1
mov rax, qword [rsi]
lea rcx, [rax + 0xd]
jmp 0x4059d1
mov rax, qword [0x00410040]
lea rcx, [rbp - 0x118]
mov rdx, rbp
mov qword [0x00410040], rcx
add rcx, 0x10
mov qword [rbp - 0x118], rax
call sub.msvcrt.dll__setjmp
movsxd rsi, eax
test rsi, rsi
mov qword [rbp - 0x110], rsi
jne 0x405974
xor ecx, ecx
call qword [fcn.00408490]
cmp qword [rbp - 0x130], rax
jne 0x405871
mov rcx, qword [rbp - 0x130]
call fcn.004056a0
jmp 0x40594f
mov rcx, qword [rbp - 0x130]
call fcn.00407f90
mov rcx, qword [rbp - 0x130]
xor edx, edx
mov r8d, 2
mov rbx, rax
call fcn.004081e0
mov rcx, qword [rbp - 0x130]
call fcn.00407f90
mov rcx, qword [rbp - 0x130]
xor r8d, r8d
mov rdx, rbx
mov rdi, rax
call fcn.004081e0
test rdi, rdi
jle 0x405860
mov rcx, rdi
call fcn.00403bb4
mov r9, qword [rbp - 0x130]
mov r8, rdi
mov edx, 1
mov qword [rax], rdi
lea rcx, [rax + 0x10]
mov rbx, rax
call sub.msvcrt.dll_fread
cmp rdi, rax
mov r12, rax
je 0x405904
mov rcx, qword [rbp - 0x130]
call sub.msvcrt.dll_ferror
test eax, eax
je 0x405904
mov rcx, qword [rbp - 0x130]
call fcn.004055e8
mov rcx, qword [rbp - 0x130]
call sub.msvcrt.dll_fgetc
mov rdx, qword [rbp - 0x130]
mov r13d, eax
mov ecx, eax
call sub.msvcrt.dll_ungetc
test r13d, r13d
js 0x40593f
mov rcx, qword [rbp - 0x130]
call fcn.004056a0
test rax, rax
mov rdi, rax
je 0x405954
mov rsi, qword [rax]
jmp 0x405954
cmp rdi, r12
jle 0x40596d
mov rdx, r12
mov rcx, rbx
call fcn.00403f61
mov rbx, rax
jmp 0x40596d
mov rcx, rbx
mov rdx, rsi
call fcn.00404414
mov rdx, rdi
mov rcx, rax
mov rbx, rax
call fcn.00401a3e
mov qword [rbp - 0x120], rbx
call fcn.004017fe
cmp qword [rbp - 0x130], 0
jne 0x405993
cmp qword [rbp - 0x110], 0
je 0x405a30
jmp 0x4059a1
mov rcx, qword [rbp - 0x130]
call sub.msvcrt.dll_fclose
jmp 0x405983
mov rcx, qword [0x00410040]
test rcx, rcx
jne 0x4059c3
mov rcx, qword [0x00410048]
call fcn.004047cc
mov ecx, 1
call sub.msvcrt.dll_exit
add rcx, 0x10
mov edx, 1
call fcn.00407e56
call fcn.00403bb4
lea rdx, [0x0040c620]
mov rcx, rax
mov r9, rax
call fcn.00401a18
mov rdx, rsi
mov rcx, r9
call fcn.00401a3e
lea rcx, [rbx + 0x18]
mov rdx, r9
call fcn.00402f0a
lea rcx, [rbx + 8]
xor edx, edx
call fcn.00402f0a
lea r9, str.io.nim
mov rcx, rbx
mov qword [rsp + 0x20], 0x366
lea r8, str.readFile
lea rdx, str.IOError
call fcn.00404827
mov rax, qword [rbp - 0x120]
add rsp, 0x168
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop rbp
ret
Function at 0x405a47
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov rbp, qword [fcn.00408490]
xor edi, edi
mov r14, rcx
mov r13, rdx
mov rsi, qword [r14 + rdi*8]
lea r15, [0x0040c23a]
mov ecx, 1
call rbp
mov r12, rax
mov rcx, rsi
call fcn.00401685
lea rdx, [0x0040c23a]
mov rcx, r12
mov r8, rax
call sub.msvcrt.dll_fprintf
mov ebx, eax
xor edx, edx
test rsi, rsi
movsxd rax, ebx
je 0x405aa4
mov rdx, qword [rsi]
cmp rax, rdx
jge 0x405ada
cmp byte [rsi + rax + 0x10], 0
je 0x405ac8
lea r8, [rsi + rax + 0x10]
mov rdx, r15
mov rcx, r12
call sub.msvcrt.dll_fprintf
test eax, eax
jle 0x405ada
add ebx, eax
jmp 0x405a97
xor ecx, ecx
mov rdx, r12
call sub.msvcrt.dll_fputc
test eax, eax
jne 0x405ada
inc ebx
jmp 0x405a97
inc rdi
cmp r13, rdi
jne 0x405a66
mov ecx, 1
call rbp
mov r8d, 1
mov edx, 1
lea rcx, [0x0040c014]
mov r9, rax
call sub.msvcrt.dll_fwrite
mov ecx, 1
call rbp
mov rcx, rax
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp fcn.004083c0
Function at 0x406eb0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x00422fa4]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x407038
mov rax, qword [0x00422fa8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x406efc
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x406f85
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x406ee0
mov rcx, rbx
call fcn.00407b50
test rax, rax
mov r12, rax
je 0x40706d
mov rax, qword [0x00422fa8]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call fcn.00407c80
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x00422fa8]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x407050
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x406f7e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x406fe0
add dword [0x00422fa4], 1
cmp edi, 8
jae 0x406fb3
test dil, 4
jne 0x407024
test edi, edi
je 0x406fa8
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x40703f
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, edi
sub edi, 1
mov rdx, qword [rbp + rax - 8]
cmp edi, 8
mov qword [rbx + rax - 8], rdx
jb 0x406fa8
and edi, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov rcx, qword [rbp + rdx]
cmp eax, edi
mov qword [rbx + rdx], rcx
jb 0x406fcc
jmp 0x406fa8
add rsi, qword [0x00422fa8]
mov r8d, 0x40
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r9, rsi
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x406f7e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.0040a3a0
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x406fa8
xor esi, esi
jmp 0x406f07
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x406fa8
mov rax, qword [0x00422fa8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call fcn.0040a3a0
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.0040a3a0
nop
nop dword [rax]

Function at 0x4077c0
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x00423280]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x00423260]
test rbx, rbx
je 0x407814
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x40780b
test rsi, rsi
je 0x40780b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x4077f0
lea rcx, [0x00423280]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x407b50
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x0040dba0]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x407bbd
mov rcx, r8
call fcn.00407a30
test eax, eax
je 0x407bbd
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x407bbd
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x407bb4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x407bbf
add rax, 0x28
cmp rax, r9
jne 0x407ba0
xor eax, eax
add rsp, 0x28
ret

Function at 0x40a3a0
Capabilities:
Write file on windows

Disassembly:
lea rcx, [0x00401540]
jmp 0x401510
push rsi
push rbx
sub rsp, 0x38
lea rax, [rsp + 0x58]
mov rbx, rcx
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.00408490
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call fcn.00408490
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop
nop
nop
nop
nop
nop
nop
jmp 0x401530
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x1400178a0]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x1400178b0]
mov dword [rax], 1
mov rax, qword [0x1400178c0]
mov dword [rax], 1
mov rax, qword [0x140017840]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x140017890]
mov dword [0x14001a00c], 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 [0x140017970]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x140017950]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x1400177f0]
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