joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140001378
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x140005440]
mov dword [rax], 1
mov rax, qword [0x140005450]
mov dword [rax], 1
mov rax, qword [0x140005460]
mov dword [rax], 1
mov rax, qword [0x140005400]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400013c9
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x1400013f5
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
movzx eax, ax
cmp eax, 0x10b
je 0x14000141b
cmp eax, 0x20b
je 0x140001442
jmp 0x140001471
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x5c]
cmp eax, 0xe
ja 0x14000142e
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x6c]
cmp eax, 0xe
ja 0x14000145d
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov eax, 0
add rsp, 0x20
pop rbp
ret

Function at 0x140001a00
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call sym.__acrt_iob_func
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sym.fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call sym.__acrt_iob_func
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call sym.vfprintf
call sym.abort
nop

Function at 0x1400026d2
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x140009168]
test eax, eax
je 0x14000276a
lea rax, [0x140009140]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x140009170]
mov qword [rbp - 8], rax
jmp 0x14000274e
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x140002742
cmp qword [rbp - 0x10], 0
je 0x140002742
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x140002708
lea rax, [0x140009140]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x14000276b
nop
add rsp, 0x30
pop rbp
ret
Function at 0x140001180
Capabilities:
Terminate process

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rbx, qword [0x140004440]
mov rbp, qword [sym.imp.KERNEL32.dll_Sleep]
xor edi, edi
mov rax, qword gs:[0x30]
mov rsi, qword [rax + 8]
jmp 0x1400011c0
cmp rsi, rax
je 0x140001320
mov ecx, 0x3e8
call rbp
mov rax, rdi
lock cmpxchg qword [rbx], rsi
test rax, rax
jne 0x1400011b0
mov rsi, qword [0x140004450]
xor edi, edi
mov eax, dword [rsi]
cmp eax, 1
je 0x140001337
mov eax, dword [rsi]
test eax, eax
je 0x1400013a0
mov dword [0x140007008], 1
mov eax, dword [rsi]
cmp eax, 1
je 0x14000134c
test edi, edi
je 0x14000136d
mov rax, qword [0x1400043b0]
mov rax, qword [rax]
test rax, rax
je 0x140001223
xor r8d, r8d
mov edx, 2
xor ecx, ecx
call rax
call dbg._pei386_runtime_relocator
mov rcx, qword [dbg._gnu_exception_handler]
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rdx, qword [0x140004430]
lea rcx, [dbg.__mingw_invalidParameterHandler]
mov qword [rdx], rax
call sym._set_invalid_parameter_handler
call dbg._fpreset
mov ebx, dword [0x140007028]
lea edi, [rbx + 1]
movsxd rdi, edi
shl rdi, 3
mov rcx, rdi
call sym.malloc
mov r12, qword [0x140007020]
mov rbp, rax
test ebx, ebx
jle 0x1400013c0
sub rdi, 8
xor ebx, ebx
mov rcx, qword [r12 + rbx]
call sym.strlen
lea rsi, [rax + 1]
mov rcx, rsi
call sym.malloc
mov r8, rsi
mov qword [rbp + rbx], rax
mov rdx, qword [r12 + rbx]
mov rcx, rax
add rbx, 8
call sym.memcpy
cmp rdi, rbx
jne 0x140001280
add rdi, rbp
mov qword [rdi], 0
mov qword [0x140007020], rbp
call dbg.__main
mov rax, qword [0x1400043c0]
mov r8, qword [0x140007018]
mov ecx, dword [0x140007028]
mov rax, qword [rax]
mov qword [rax], r8
mov rdx, qword [0x140007020]
call dbg.main
mov ecx, dword [0x14000700c]
mov dword [0x140007010], eax
test ecx, ecx
je 0x1400013c8
mov edx, dword [0x140007008]
test edx, edx
je 0x140001380
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rsi, qword [0x140004450]
mov edi, 1
mov eax, dword [rsi]
cmp eax, 1
jne 0x1400011e1
mov ecx, 0x1f
call dbg._amsg_exit
mov eax, dword [rsi]
cmp eax, 1
jne 0x140001200
mov rdx, qword [0x140004470]
mov rcx, qword [0x140004460]
call sym._initterm
mov dword [rsi], 2
test edi, edi
jne 0x140001208
xor eax, eax
xchg qword [rbx], rax
jmp 0x140001208
call sym._cexit
mov eax, dword [0x140007010]
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rdx, qword [0x140004490]
mov rcx, qword [0x140004480]
mov dword [rsi], 1
call sym._initterm
jmp 0x1400011f5
mov rdi, rax
jmp 0x1400012b5
mov ecx, eax
call sym.exit
nop
Function at 0x1400014e2
Capabilities:
Create thread

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x50
call dbg.__main
mov dword [rbp - 0x1c], 0
mov eax, dword [0x140003114]
mov eax, eax
mov r9d, 4
mov r8d, 0x3000
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
call rax
mov qword [rbp - 8], rax
mov eax, dword [0x140003114]
mov eax, eax
mov r9d, 0x11
lea r8, str.mysupersecretkey
mov rdx, rax
lea rax, section..data
mov rcx, rax
call dbg.XOR(char*, unsigned long long, char*, unsigned long long)
mov eax, dword [0x140003114]
mov edx, eax
mov rax, qword [rbp - 8]
mov r8, rdx
lea rdx, section..data
mov rcx, rax
call main
mov eax, dword [0x140003114]
mov ecx, eax
lea rdx, [rbp - 0x1c]
mov rax, qword [rbp - 8]
mov r9, rdx
mov r8d, 0x20
mov rdx, rcx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualProtect]
call rax
mov dword [rbp - 0xc], eax
cmp dword [rbp - 0xc], 0
je 0x1400015df
mov rax, qword [rbp - 8]
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8, rax
mov edx, 0
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateThread]
call rax
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
mov edx, 0xffffffff
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call rax
mov eax, 0
add rsp, 0x50
pop rbp
ret

Function at 0x1400018b0
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 sym.__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 sym.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call dbg.vfprintf
call sym.abort
nop
nop dword [rax]
Function at 0x140001920
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140007094]
mov rbx, rcx
test esi, esi
jle 0x140001a50
mov rax, qword [0x140007098]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14000196b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x1400019f5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140001950
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x140001a72
mov rax, qword [0x140007098]
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 [0x140007098]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140001a57
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x1400019ee
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x140001a00
add dword [0x140007094], 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 [0x140007098]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400019ee
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 0x140001978
mov rax, qword [0x140007098]
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 0x140002000
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140007100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400070e0]
test rbx, rbx
je 0x14000205c
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 rsi, rsi
je 0x140002053
test eax, eax
jne 0x140002053
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140002038
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 0x140002270
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x140002288
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x140002290
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret
Function at 0x1400022a0
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
movzx r8d, word [rcx + 6]
lea rax, [rcx + rax + 0x18]
test r8w, r8w
je 0x1400022ed
lea ecx, [r8 - 1]
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp rdx, r8
jb 0x1400022e4
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x1400022ef
add rax, 0x28
cmp rax, r9
jne 0x1400022d0
xor eax, eax
ret

Function at 0x1400022f0
Capabilities:
Parse pe header

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, rcx
call sym.strlen
cmp rax, 8
ja 0x140002380
mov rdx, qword [0x140004380]
xor ebx, ebx
cmp word [rdx], 0x5a4d
jne 0x14000236e
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x14000236e
cmp word [rax + 0x18], 0x20b
jne 0x14000236e
movzx edx, word [rax + 0x14]
lea rbx, [rax + rdx + 0x18]
movzx edx, word [rax + 6]
test dx, dx
je 0x140002380
lea eax, [rdx - 1]
lea rax, [rax + rax*4]
lea rdi, [rbx + rax*8 + 0x28]
jmp 0x140002359
add rbx, 0x28
cmp rbx, rdi
je 0x140002380
mov r8d, 8
mov rdx, rsi
mov rcx, rbx
call sym.strncmp
test eax, eax
jne 0x140002350
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
xor ebx, ebx
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret

Function at 0x140002390
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x140004380]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x1400023b0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x1400023b8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x1400023b0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x14000240d
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x140002404
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x1400023b0
add rax, 0x28
cmp rax, r9
jne 0x1400023f0
xor eax, eax
ret

Function at 0x140002410
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140004380]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x14000242f
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x140002438
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x14000242f
movzx ecx, word [rax + 6]
mov eax, ecx
ret

Function at 0x140002450
Capabilities:
Parse pe header

Disassembly:
mov r8, qword [0x140004380]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x140002470
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x140002478
ret
cmp word [rdx + 0x18], 0x20b
jne 0x140002470
movzx eax, word [rdx + 0x14]
movzx r8d, word [rdx + 6]
lea rax, [rdx + rax + 0x18]
test r8w, r8w
je 0x1400024c0
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x1400024b7
test rcx, rcx
je 0x140002470
sub rcx, 1
add rax, 0x28
cmp rdx, rax
jne 0x1400024a8
xor eax, eax
ret
Function at 0x1400024d0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140004380]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x1400024ef
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x1400024f8
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret

Function at 0x140002510
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x140004380]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140002530
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140002538
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140002530
sub rcx, rdx
movzx r9d, word [r8 + 6]
movzx edx, word [r8 + 0x14]
lea rdx, [r8 + rdx + 0x18]
test r9w, r9w
je 0x140002530
lea eax, [r9 - 1]
lea rax, [rax + rax*4]
lea r9, [rdx + rax*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rdx + 0xc]
mov rax, r8
cmp rcx, r8
jb 0x140002584
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x140002590
add rdx, 0x28
cmp rdx, r9
jne 0x140002570
xor eax, eax
ret
mov eax, dword [rdx + 0x24]
not eax
shr eax, 0x1f
ret

Function at 0x1400025a0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov r11, qword [0x140004380]
xor r9d, r9d
cmp word [r11], 0x5a4d
jne 0x1400025c2
movsxd r8, dword [r11 + 0x3c]
add r8, r11
cmp dword [r8], 0x4550
je 0x1400025d0
mov rax, r9
ret
cmp word [r8 + 0x18], 0x20b
jne 0x1400025c2
mov eax, dword [r8 + 0x90]
test eax, eax
je 0x1400025c2
movzx edx, word [r8 + 0x14]
movzx r10d, word [r8 + 6]
lea rdx, [r8 + rdx + 0x18]
test r10w, r10w
je 0x1400025c2
lea r8d, [r10 - 1]
lea r8, [r8 + r8*4]
lea r10, [rdx + r8*8 + 0x28]
nop word cs:[rax + rax]
mov r9d, dword [rdx + 0xc]
mov r8, r9
cmp rax, r9
jb 0x140002625
add r8d, dword [rdx + 8]
cmp rax, r8
jb 0x140002638
add rdx, 0x28
cmp r10, rdx
jne 0x140002610
xor r9d, r9d
mov rax, r9
ret
add rax, r11
jmp 0x140002647
sub ecx, 1
add rax, 0x14
mov r8d, dword [rax + 4]
test r8d, r8d
jne 0x140002657
mov edx, dword [rax + 0xc]
test edx, edx
je 0x14000262e
test ecx, ecx
jg 0x140002640
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
ret
Function at 0x1806a5058
Capabilities:
Decompress data using aplib

Disassembly:
call 0x1806a51df
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 0x1806a5089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1806a506f
add dl, dl
jne 0x1806a5096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1806a50f6
xor eax, eax
add dl, dl
jne 0x1806a50a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1806a51ad
add dl, dl
jne 0x1806a50b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1806a50c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1806a50d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1806a50dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1806a50ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x1806a507e
mov eax, 1
add dl, dl
jne 0x1806a5106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1806a5113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1806a50fb
sub eax, ebx
mov ebx, 1
jne 0x1806a514c
mov ecx, 1
add dl, dl
jne 0x1806a512e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1806a513b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1806a5123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1806a507e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x1806a5168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1806a5175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1806a515d
cmp eax, 0x7d00
jae 0x1806a519b
cmp eax, 0x500
jb 0x1806a5196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1806a507e
cmp eax, 0x7f
ja 0x1806a519e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1806a507e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1806a51d2
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 0x1806a507e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x1800010f0
Capabilities:
Connect socket
Initialize winsock library

Disassembly:
mov word [rsp + 0x18], r8w
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0x28
xor r8d, r8d
mov edx, 1
mov ecx, 2
call qword [sym.imp.WS2_32.dll_socket]
mov rcx, qword [rsp + 0x30]
mov qword [rcx], rax
mov rax, qword [rsp + 0x30]
mov ecx, dword [rsp + 0x38]
mov dword [rax + 0x1a4], ecx
mov rax, qword [rsp + 0x30]
movzx ecx, word [rsp + 0x40]
mov word [rax + 0x1a2], cx
mov eax, 2
mov rcx, qword [rsp + 0x30]
mov word [rcx + 0x1a0], ax
mov rax, qword [rsp + 0x30]
add rax, 8
mov rdx, rax
mov cx, 0x202
call qword [sym.imp.WS2_32.dll_WSAStartup]
xor r8d, r8d
mov edx, 1
mov ecx, 2
call qword [sym.imp.WS2_32.dll_socket]
mov rcx, qword [rsp + 0x30]
mov qword [rcx], rax
mov rax, qword [rsp + 0x30]
add rax, 0x1a0
mov r8d, reloc.WS2_32.dll_recv
mov rdx, rax
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax]
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x1800011a8
jmp 0x180001180
mov rax, qword [rsp + 0x30]
add rsp, 0x28
ret

Function at 0x1800011b8
Capabilities:
Send data
Send data on socket

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x38
mov eax, dword [rsp + 0x50]
add eax, 4
mov eax, eax
mov ecx, eax
call fcn.180015a64
mov qword [rsp + 0x20], rax
mov eax, dword [rsp + 0x50]
mov rcx, qword [rsp + 0x20]
add rcx, 4
mov r8d, eax
mov rdx, qword [rsp + 0x48]
call fcn.180031e50
mov eax, dword [rsp + 0x50]
shr eax, 0x18
and eax, 0xff
mov ecx, 1
imul rcx, rcx, 0
mov rdx, qword [rsp + 0x20]
mov byte [rdx + rcx], al
mov eax, dword [rsp + 0x50]
shr eax, 0x10
and eax, 0xff
mov ecx, 1
imul rcx, rcx, 1
mov rdx, qword [rsp + 0x20]
mov byte [rdx + rcx], al
mov eax, dword [rsp + 0x50]
shr eax, 8
and eax, 0xff
mov ecx, 1
imul rcx, rcx, 2
mov rdx, qword [rsp + 0x20]
mov byte [rdx + rcx], al
mov eax, dword [rsp + 0x50]
and eax, 0xff
mov ecx, 1
imul rcx, rcx, 3
mov rdx, qword [rsp + 0x20]
mov byte [rdx + rcx], al
mov eax, dword [rsp + 0x50]
add eax, 4
xor r9d, r9d
mov r8d, eax
mov rdx, qword [rsp + 0x20]
mov rax, qword [rsp + 0x40]
mov rcx, qword [rax]
call qword [sym.imp.WS2_32.dll_send]
mov rcx, qword [rsp + 0x20]
call fcn.180015a50
xor eax, eax
add rsp, 0x38
ret
Function at 0x1800012a4
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x48
xor r9d, r9d
mov r8d, 4
lea rdx, [rsp + 0x24]
mov rax, qword [rsp + 0x50]
mov rcx, qword [rax]
call qword [sym.imp.WS2_32.dll_recv]
mov dword [rsp + 0x2c], eax
cmp dword [rsp + 0x2c], 0
jne 0x1800012e3
mov eax, 2
jmp 0x18000143e
mov dword [0x1800462e8], 0
mov eax, 1
imul rax, rax, 0
movzx eax, byte [rsp + rax + 0x24]
shl eax, 0x18
mov ecx, dword [0x1800462e8]
or ecx, eax
mov eax, ecx
mov dword [0x1800462e8], eax
mov eax, 1
imul rax, rax, 1
movzx eax, byte [rsp + rax + 0x24]
shl eax, 0x10
mov ecx, dword [0x1800462e8]
or ecx, eax
mov eax, ecx
mov dword [0x1800462e8], eax
mov eax, 1
imul rax, rax, 2
movzx eax, byte [rsp + rax + 0x24]
shl eax, 8
mov ecx, dword [0x1800462e8]
or ecx, eax
mov eax, ecx
mov dword [0x1800462e8], eax
mov eax, 1
imul rax, rax, 3
movzx eax, byte [rsp + rax + 0x24]
mov ecx, dword [0x1800462e8]
or ecx, eax
mov eax, ecx
mov dword [0x1800462e8], eax
mov eax, dword [0x1800462e8]
inc eax
mov eax, eax
mov ecx, eax
call fcn.180015a64
mov rcx, qword [rsp + 0x58]
mov qword [rcx], rax
mov rax, qword [rsp + 0x58]
mov rax, qword [rax]
mov qword [rsp + 0x30], rax
mov eax, dword [0x1800462e8]
mov rcx, qword [rsp + 0x30]
mov byte [rcx + rax], 0
mov dword [rsp + 0x20], 0
mov dword [rsp + 0x28], 1
mov eax, dword [0x1800462e8]
cmp dword [rsp + 0x20], eax
jb 0x1800013c6
cmp dword [rsp + 0x28], 0
jne 0x180001410
mov eax, dword [rsp + 0x20]
mov ecx, dword [0x1800462e8]
sub ecx, eax
mov eax, ecx
mov ecx, dword [rsp + 0x20]
mov rdx, qword [rsp + 0x30]
add rdx, rcx
mov rcx, rdx
xor r9d, r9d
mov r8d, eax
mov rdx, rcx
mov rax, qword [rsp + 0x50]
mov rcx, qword [rax]
call qword [sym.imp.WS2_32.dll_recv]
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x28]
mov ecx, dword [rsp + 0x20]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x20], eax
jmp 0x1800013b3
mov eax, dword [0x1800462e8]
cmp dword [rsp + 0x20], eax
jae 0x18000142f
lea rcx, str.Too_few_bytes_received__assuming_disconnect_n
call fcn.180001544
mov eax, 2
jmp 0x18000143e
mov eax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x30]
mov byte [rcx + rax], 0
xor eax, eax
add rsp, 0x48
ret

Function at 0x18000159c
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x28
mov rdx, qword [rsp + 0x30]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
jne 0x1800015c0
mov eax, 1
jmp 0x1800015c2
xor eax, eax
add rsp, 0x28
ret

Function at 0x1800015d0
Capabilities:
Set current directory

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x28
mov rdx, qword [rsp + 0x30]
lea rcx, str.Changing_dir_to__s_n
call fcn.180001544
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x1800015fd
xor eax, eax
jmp 0x180001602
mov eax, 1
add rsp, 0x28
ret