joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140002630
Capabilities:
Write file on windows

Disassembly:
push rbx
push rdi
push r15
sub rsp, 0x20
cmp qword [rcx + 0x68], 0
mov rbx, r8
mov r15, rdx
mov rdi, rcx
je case.default.0x140002651
add rsp, 0x20
pop r15
pop rdi
pop rbx
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const____ptr64__long_long___int64_____ptr64]
mov rax, qword [rcx + 0x40]
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x48], rsi
mov rsi, rbx
mov qword [rsp + 0x58], r14
mov r9, qword [rax]
test r9, r9
je 0x14000267e
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x140002680
xor ecx, ecx
movsxd rbp, ecx
test rbx, rbx
jle 0x1400026d9
test ecx, ecx
jle 0x1400026b9
cmp rbx, rbp
mov rcx, r9
cmovl rbp, rbx
mov r8, rbp
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rdi + 0x58]
add r15, rbp
sub rbx, rbp
sub dword [rax], ebp
mov rcx, qword [rdi + 0x40]
movsxd rax, ebp
add qword [rcx], rax
test rbx, rbx
jle 0x1400026d9
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x1400026d9
mov r8, rbx
mov edx, 1
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
sub rbx, rax
mov r14, qword [rsp + 0x58]
sub rsi, rbx
mov rbp, qword [rsp + 0x40]
mov rax, rsi
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop r15
pop rdi
pop rbx
ret
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
Function at 0x140002700
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push r14
sub rsp, 0x30
mov rbp, r8
mov r14, rdx
mov rsi, rcx
test r8, r8
jg 0x140002722
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
cmp qword [rcx + 0x68], 0
je case.default.0x140002731
add rsp, 0x30
pop r14
pop rsi
pop rbp
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char____ptr64__long_long___int64_____ptr64]
mov rax, qword [rcx + 0x38]
mov qword [rsp + 0x28], rbx
mov rbx, rbp
mov rdx, qword [rax]
test rdx, rdx
je 0x140002754
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x140002756
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x140002792
mov qword [rsp + 0x20], rdi
cmp rax, rbp
mov rdi, rbp
mov rcx, r14
cmovb rdi, rax
mov r8, rdi
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rsi + 0x50]
add r14, rdi
sub rbx, rdi
sub dword [rax], edi
mov rcx, qword [rsi + 0x38]
movsxd rax, edi
mov rdi, qword [rsp + 0x20]
add qword [rcx], rax
cmp qword [rsi + 0x80], 0
je 0x14000282e
mov r8, qword [rsi + 0x18]
lea rax, [rsi + 0x70]
cmp qword [r8], rax
jne 0x1400027cd
mov rcx, qword [rsi + 0x88]
mov rdx, qword [rsi + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rsi + 0x38]
mov qword [rax], rcx
mov rax, qword [rsi + 0x50]
mov dword [rax], edx
cmp rbx, 0xfff
jbe 0x14000280e
nop word [rax + rax]
mov r9, qword [rsi + 0x80]
mov edx, 1
mov r8d, 0xfff
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add r14, rax
sub rbx, rax
cmp rax, 0xfff
jne 0x14000282e
cmp rbx, rax
ja 0x1400027e0
test rbx, rbx
je 0x14000282e
mov r9, qword [rsi + 0x80]
mov r8, rbx
mov edx, 1
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
sub rbx, rax
sub rbp, rbx
mov rbx, qword [rsp + 0x28]
mov rax, rbp
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
Function at 0x140002c90
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x140009040]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x140002cbd
xor eax, eax
jmp 0x140002e29
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x140002cf7
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x140002cf7
lea ecx, [r8 - 1]
mov dword [rax], ecx
mov eax, edi
mov rdx, qword [rbx + 0x40]
mov r8, qword [rdx]
lea rcx, [r8 + 1]
mov qword [rdx], rcx
mov byte [r8], dil
jmp 0x140002e29
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x140002e1c
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x140002d3a
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
mov rcx, qword [rbx + 0x68]
test rcx, rcx
jne 0x140002d65
mov rdx, qword [rbx + 0x80]
movsx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x140002e21
lea rax, [rsp + 0x40]
mov byte [rsp + 0x50], dil
mov qword [rsp + 0x38], rax
lea rdx, [rbx + 0x74]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x30], rax
lea r9, [rsp + 0x51]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
lea r8, [rsp + 0x50]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet____ptr64__char_const____ptr64__char_const____ptr64__char_const____ptr64____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140002dd4
sub eax, 1
je 0x140002dd4
cmp eax, 2
jne 0x140002e1c
movsx ecx, byte [rsp + 0x50]
mov rdx, qword [rbx + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x140002e21
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x140002e02
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x58]
mov r8, rsi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rsi, rax
jne 0x140002e1c
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x140002e21
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.140003da0
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret
Function at 0x140003240
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x140009040]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x140003313
cmp byte [rcx + 0x71], 0
je 0x140003313
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x78], rdi
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x14000330f
mov rcx, qword [rbx + 0x68]
lea rax, [rsp + 0x30]
lea rdx, [rbx + 0x74]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x58]
lea r8, [rsp + 0x38]
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x1400032d4
sub eax, 1
je 0x1400032d8
cmp eax, 2
jne 0x14000330f
mov byte [rbx + 0x71], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140003da0
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x140003306
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x38]
mov r8, rdi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rdi, rax
jne 0x14000330f
cmp byte [rbx + 0x71], 0
sete al
jmp 0x1400032bc
xor al, al
jmp 0x1400032bc
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140003da0
add rsp, 0x60
pop rbx
ret

Function at 0x140004720
Capabilities:
Parse pe header

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

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
mov qword [r11 + 0x10], rbp
mov qword [r11 + 0x20], rsi
push rdi
sub rsp, 0x30
lea rax, [r11 + 0x18]
mov r9, rdx
mov r8, rcx
mov qword [r11 - 0x10], rax
xor edi, edi
mov edx, 0x1000
xor ecx, ecx
mov dword [rsp + 0x20], edi
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rbp, rax
test rax, rax
je 0x1400016f8
lea rcx, [0x140099140]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140099120]
jmp 0x1400016be
lea rsi, [rbx + 0x10]
xor edx, edx
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x1400016bb
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [rbx]
lea rcx, [0x140099120]
mov rdx, rsi
call fcn.140008904
jmp 0x1400016be
mov rbx, qword [rbx]
test rbx, rbx
jne 0x14000168b
mov rdi, qword [reloc.WS2_32.dll_accept]
lea rcx, [0x140099120]
lea rdx, [rdi + 1]
mov qword [reloc.WS2_32.dll_accept], rdx
lea edx, [rbx + 0x20]
call fcn.1400088c0
lea rcx, [0x140099140]
mov qword [rax], rbp
mov qword [rax + 8], rdi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rbx, qword [rsp + 0x40]
mov rax, rdi
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
ret

Function at 0x140002010
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rbx, rcx
mov esi, 0x40
mov ecx, esi
call fcn.140008950
mov rdx, rbx
mov rcx, rax
mov rdi, rax
call fcn.14000957c
mov rdx, 0xffffffffffffffff
inc rdx
cmp word [rdi + rdx*2], 0
jne 0x140002043
sub esi, edx
mov ecx, esi
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
jmp fcn.140008a00
Function at 0x140002200
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push r12
push r13
push r15
sub rsp, 0x28
xor ebp, ebp
mov r13d, r9d
mov r15d, edx
mov r12d, ebp
cmp edx, 1
jl 0x14000236b
test rcx, rcx
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x60], rdi
mov edi, ebp
mov qword [rsp + 0x20], r14
lea r14, [0x140080ca8]
mov rsi, r14
cmovne rsi, rcx
test r8, r8
cmovne r14, r8
movzx ecx, word [r14]
test cx, cx
je 0x1400022fa
cmp word [r14 + 2], di
je 0x1400022fa
mov rax, 0xffffffffffffffff
nop dword [rax]
inc rax
cmp word [r14 + rax*2], di
jne 0x140002270
mov rbx, rsi
movsxd rbp, eax
mov r8, rbp
mov rdx, r14
mov rcx, rbx
call fcn.1400091fc
test eax, eax
je 0x14000229e
cmp word [rbx], r12w
je 0x14000229e
add rbx, 2
jmp 0x140002280
inc edi
cmp edi, r15d
je 0x1400022b4
cmp word [rbx], r12w
je 0x1400022bd
lea rbx, [rbx + rbp*2]
mov rsi, rbx
jmp 0x140002280
mov r12, rbx
sub r12, rsi
sar r12, 1
xor ebp, ebp
mov rcx, rbx
call fcn.140008a30
mov r14, qword [rsp + 0x20]
movsxd rbx, r12d
test eax, eax
je 0x140002330
mov ecx, r13d
call fcn.14000da30
lea r8, [rbx + rbx]
mov rdx, rsi
mov rcx, rax
call fcn.140008b00
mov edx, r13d
mov ecx, r12d
call fcn.140008950
mov rdi, rax
jmp 0x14000234c
mov rbx, rsi
nop dword [rax]
movzx eax, word [rbx]
cmp ax, cx
je 0x140002313
test ax, ax
je 0x140002313
add rbx, 2
jmp 0x140002300
inc edi
cmp edi, r15d
je 0x140002325
test ax, ax
je 0x1400022bf
lea rsi, [rbx + 2]
jmp 0x1400022fa
mov r12, rbx
sub r12, rsi
sar r12, 1
jmp 0x1400022bf
mov edx, r13d
mov ecx, r12d
call fcn.140008950
mov r8, rbx
mov rdx, rsi
mov rcx, rax
mov rdi, rax
call fcn.140009228
mov rsi, qword [rsp + 0x58]
mov word [rdi + rbx*2], bp
mov rdi, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x50]
add rsp, 0x28
pop r15
pop r13
pop r12
pop rbp
ret
mov ecx, r13d
add rsp, 0x28
pop r15
pop r13
pop r12
pop rbp
jmp fcn.140008aa0
Function at 0x140002740
Capabilities:
Accept command line arguments

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x20
mov rbx, rcx
mov rcx, qword [0x1400991a0]
call fcn.1400076b8
mov rsi, rax
or edi, 0xffffffff
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
xor ebp, ebp
mov rdx, rax
movzx r8d, word [rax]
test r8w, r8w
je 0x140002877
mov rcx, qword [rsp + 0x30]
jmp 0x140002791
add rdx, 2
movzx r8d, word [rdx]
cmp r8w, 0x20
je 0x140002789
mov r11d, 1
cmp r8w, 0x22
jne 0x1400027e0
add rdx, 2
mov r9, rdx
movzx r8d, word [rdx]
test r8w, r8w
je 0x14000283f
movzx eax, r8w
movzx r8d, ax
cmp ax, 0x22
je 0x1400027da
add rdx, 2
movzx r8d, word [rdx]
movzx eax, r8w
test r8w, r8w
jne 0x1400027be
test r8w, r8w
jmp 0x14000283f
test r8w, r8w
je 0x14000284f
mov r9, rdx
movzx r10d, r8w
cmp r8w, 0x20
je 0x14000283b
add rdx, 2
movzx r8d, word [rdx]
cmp r8w, 0x22
jne 0x140002831
add rdx, 2
movzx r8d, word [rdx]
test r8w, r8w
je 0x140002831
movzx eax, r8w
movzx r8d, ax
cmp ax, 0x22
je 0x140002831
add rdx, 2
movzx r8d, word [rdx]
movzx eax, r8w
test r8w, r8w
jne 0x140002815
movzx r10d, r8w
test r8w, r8w
jne 0x1400027e9
test r10w, r10w
lea rax, [rdx + 2]
mov rcx, rdx
cmove rax, rdx
mov rdx, rax
jmp 0x140002855
mov r11d, ebp
mov r9, rbp
cmp dword [rsi], edi
jne 0x14000285e
test rbx, rbx
jne 0x140002881
movzx r8d, word [rdx]
lea eax, [rdi + 1]
test r11d, r11d
cmove eax, edi
mov edi, eax
test r8w, r8w
jne 0x140002791
test rbx, rbx
jne 0x140002895
movsxd rax, edi
jmp 0x14000289a
test r9, r9
je 0x140002895
sub rcx, r9
mov rax, r9
sar rcx, 1
mov dword [rbx], ecx
inc dword [rsi]
jmp 0x14000289a
mov dword [rbx], ebp
mov rax, rdx
mov rbx, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret

Function at 0x1400028b0
Capabilities:
Get thread local storage value

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
push rdi
sub rsp, 0x20
mov ebx, ecx
xor ebp, ebp
lea rcx, [rax + 0x10]
mov dword [rax + 0x10], ebp
call fcn.140002740
mov esi, dword [rsp + 0x38]
mov edx, ebx
mov ecx, esi
mov rdi, rax
call fcn.140008950
mov ecx, ebp
jmp 0x140002906
test esi, esi
je 0x14000290b
movzx edx, word [rdi]
cmp dx, 0x22
jne 0x1400028f9
inc ecx
jmp 0x140002900
mov word [rax], dx
add rax, 2
add rdi, 2
dec esi
cmp word [rdi], bp
jne 0x1400028e8
mov word [rax], bp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
jmp fcn.140008a00
Function at 0x140003380
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
cmp rdx, rcx
mov rdi, rcx
mov rbx, rcx
cmovbe rdi, rdx
sub rbx, rdi
cmp dword [0x1400991ec], 0
jne 0x1400033a8
call fcn.140003310
mov ecx, dword [0x1400991e8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r11, rax
test rax, rax
jne 0x1400033d0
call fcn.140003310
mov ecx, dword [0x1400991e8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r11, rax
movsxd r9, dword [r11 + 4]
mov eax, reloc.WS2_32.dll_recv
movsxd r10, dword [r11]
mov r8d, dword [r11 + r10*4 + 0x4c]
mov edx, dword [r11 + r10*4 + 8]
ror r8d, 0xd
add r8d, dword [r11 + r9*4 + 0x4c]
ror edx, 5
add edx, dword [r11 + r9*4 + 8]
mov dword [r11 + r10*4 + 8], r8d
mov dword [r11 + r10*4 + 0x4c], edx
sub r10d, 1
cmovs r10d, eax
sub r9d, 1
mov dword [r11], r10d
cmovs r9d, eax
mov dword [r11 + 4], r9d
mov r9d, r8d
mov r8d, edx
add rbx, 1
je 0x140003458
mov rdx, rbx
mov ecx, ebx
shr rdx, 0x20
mov rax, rdx
imul rax, r8
imul rcx, r9
imul rdx, r9
shr rax, 0x20
shr rcx, 0x20
add rax, rcx
add rax, rdx
add rax, rdi
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
mov rbx, qword [rsp + 0x30]
shl r9, 0x20
and r9, r8
lea rax, [rdi + r9]
add rsp, 0x20
pop rdi
ret

Function at 0x140003d98
Capabilities:
Initialize winsock library

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x1c0
mov ebx, reloc.WS2_32.dll_recv
lea r8, [fcn.140003cb4]
mov edx, ebx
lea ecx, [rbx + 0x28]
call fcn.14000dcb8
xor r8d, r8d
mov qword [0x140099248], rax
xor edx, edx
mov ecx, ebx
call fcn.140007750
xor ebx, ebx
mov qword [0x140099258], rax
cmp word [0x140099240], bx
jne 0x140003ebb
mov ecx, 0x101
lea rdx, [rsp + 0x20]
call qword [sym.imp.WS2_32.dll_WSAStartup]
lea edi, [rbx + 1]
test eax, eax
jne 0x140003e00
movzx eax, di
jmp 0x140003e02
mov eax, ebx
lea rcx, str.ws2_32.dll
mov word [0x140099240], ax
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov qword [0x140099250], rax
test rax, rax
je 0x140003ebb
lea rdx, [0x140082958]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x140099250]
lea rdx, [0x140082968]
mov qword [0x140099220], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x140099250]
lea rdx, str.getnameinfo
mov qword [0x140099228], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x140099250]
lea rdx, str.WSAStringToAddressA
mov qword [0x140099230], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp qword [0x140099220], rbx
mov qword [0x140099238], rax
je 0x140003ebb
cmp qword [0x140099228], rbx
je 0x140003ebb
cmp qword [0x140099230], rbx
je 0x140003ebb
mov ecx, dword [0x140099244]
test rax, rax
cmovne ecx, edi
mov dword [0x140099244], ecx
mov rbx, qword [rsp + 0x1d0]
add rsp, 0x1c0
pop rdi
ret

Function at 0x140005340
Capabilities:
Copy file

Disassembly:
sub rsp, 0x28
test rcx, rcx
je 0x14000535b
test rdx, rdx
je 0x14000535b
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_CopyFileW]
cdqe
jmp 0x14000535d
xor eax, eax
add rsp, 0x28
ret
Function at 0x140005364
Capabilities:
Create directory

Disassembly:
push rbx
sub rsp, 0x230
xor ebx, ebx
test rcx, rcx
je 0x1400053ee
mov rdx, rcx
mov r8d, 0x104
lea rcx, [rsp + 0x20]
call fcn.140009228
lea rcx, [rsp + 0x20]
mov word [rsp + 0x228], bx
call fcn.14000ddc0
lea rcx, [rsp + 0x20]
lea rcx, [rcx + rax*2]
lea rax, [rsp + 0x20]
cmp rcx, rax
jbe 0x1400053da
lea rdx, [rcx - 2]
movzx eax, word [rdx]
sub ax, 0x20
cmp ax, 0x3c
ja 0x1400053da
movabs r8, 0x1000000000008001
bt r8, rax
jae 0x1400053da
lea rax, [rsp + 0x20]
mov rcx, rdx
cmp rdx, rax
ja 0x1400053ac
mov word [rcx], bx
xor edx, edx
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cdqe
jmp 0x1400053f0
xor eax, eax
add rsp, 0x230
pop rbx
ret

Function at 0x14000576c
Capabilities:
Delete file
Set file attributes

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
test rcx, rcx
je 0x140005797
test dl, 2
je 0x14000578a
mov edx, 0x80
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
cdqe
jmp 0x140005799
xor eax, eax
add rsp, 0x20
pop rbx
ret

Function at 0x1400058ac
Capabilities:
Check if file exists

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x20
mov rax, qword [0x1400992d8]
xor r13d, r13d
mov rbp, r8
mov r14, rdx
mov rdi, rcx
mov esi, r13d
test rax, rax
jne 0x1400058fe
lea r8, [fcn.140005868]
mov ecx, 0x260
lea edx, [rax + 0x10]
call fcn.14000dcb8
mov qword [0x1400992d8], rax
mov rdx, rdi
mov rcx, rax
call fcn.14000da98
mov rbx, rax
test rax, rax
je 0x140005a01
test r14, r14
lea r15, [0x140080ca8]
cmovne r15, r14
test rbp, rbp
je 0x14000592f
cmp word [rbp], r13w
jne 0x140005936
lea rbp, [0x14008c2b0]
mov rcx, r15
call fcn.14000ddc0
mov rcx, rbp
mov r12, rax
call fcn.14000ddc0
mov rcx, qword [0x140098b20]
add eax, 2
add eax, r12d
xor edx, edx
movsxd r8, eax
add r8, r8
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r14, rax
test rax, rax
je 0x1400059ea
mov rdx, r15
mov rcx, rax
call fcn.14000dda4
test r12d, r12d
je 0x140005997
movsxd rax, r12d
cmp word [r15 + rax*2 - 2], 0x5c
je 0x140005997
lea rdx, [0x140080c5c]
mov rcx, r14
call fcn.14000dd78
mov rdx, rbp
mov rcx, r14
call fcn.14000dd78
lea rdx, [rbx + 0xc]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov qword [rbx], rax
cmp rax, 0xffffffffffffffff
je 0x1400059be
mov dword [rbx + 8], r13d
jmp 0x1400059d0
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x1400059d3
mov dword [rbx + 8], 1
mov rsi, rbx
mov rcx, qword [0x140098b20]
mov r8, r14
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
test rsi, rsi
jne 0x140005a01
mov rcx, qword [0x1400992d8]
cmp rdi, 0xffffffffffffffff
cmove rdi, rbx
mov rdx, rdi
call fcn.14000dc4c
mov rbx, qword [rsp + 0x50]
mov rax, rsi
mov rsi, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x58]
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
ret

Function at 0x140005f00
Capabilities:
Move file

Disassembly:
sub rsp, 0x28
test rcx, rcx
je 0x140005f18
test rdx, rdx
je 0x140005f18
call qword [sym.imp.KERNEL32.dll_MoveFileW]
cdqe
jmp 0x140005f1a
xor eax, eax
add rsp, 0x28
ret
Function at 0x140005fe0
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x30
xor eax, eax
mov rbx, rcx
mov dword [rsp + 0x40], eax
cmp dword [rcx + 0x1c], eax
jne 0x140006024
mov r8d, dword [rcx + 0x10]
lea r9, [rsp + 0x40]
sub r8d, dword [rcx + 0x14]
mov rdx, qword [rcx + 8]
mov rcx, qword [rcx]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [rbx + 0x10]
mov dword [rbx + 0x14], eax
movsxd rax, dword [rsp + 0x40]
add rsp, 0x30
pop rbx
ret
cdqe
add rsp, 0x30
pop rbx
ret

Function at 0x140006030
Capabilities:
Write file on windows

Disassembly:
push rdi
sub rsp, 0x30
mov rdi, rcx
cmp rcx, 0xffffffffffffffff
mov rcx, qword [0x1400992e0]
jne 0x140006050
add rsp, 0x30
pop rdi
jmp fcn.14000e26c
mov rdx, rdi
mov qword [rsp + 0x48], rbx
call fcn.14000db68
mov rbx, rax
test rax, rax
je 0x1400060c5
mov rdx, qword [rax + 8]
test rdx, rdx
je 0x1400060ad
xor eax, eax
mov dword [rsp + 0x40], eax
cmp dword [rbx + 0x1c], eax
jne 0x14000609a
mov r8d, dword [rbx + 0x10]
lea r9, [rsp + 0x40]
sub r8d, dword [rbx + 0x14]
mov rcx, qword [rbx]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [rbx + 0x10]
mov dword [rbx + 0x14], eax
mov r8, qword [rbx + 8]
xor edx, edx
mov rcx, qword [0x140098b20]
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x1400992e0]
mov rdx, rdi
call fcn.14000dc4c
mov rbx, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret

Function at 0x1400067f0
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov rdx, rcx
mov rcx, qword [0x1400992e0]
call fcn.14000db68
mov rbx, rax
test rax, rax
je 0x140006843
cmp qword [rax + 8], 0
je 0x140006822
cmp dword [rax + 0x1c], 0
jne 0x140006822
mov rcx, rax
call fcn.140005fe0
mov rcx, qword [rbx]
lea rdx, [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [rsp + 0x38]
shl rcx, 0x20
mov eax, eax
or rax, rcx
add rsp, 0x20
pop rbx
ret
mov rax, 0xffffffffffffffff
add rsp, 0x20
pop rbx
ret

Function at 0x140006a50
Capabilities:
Write file on windows

Disassembly:
mov dword [rsp + 0x10], edx
sub rsp, 0x38
mov rdx, rcx
mov dword [rsp + 0x50], 0
mov rcx, qword [0x1400992e0]
call fcn.14000db68
test rax, rax
je 0x140006aac
cmp qword [rax + 8], 0
lea rdx, [rsp + 0x48]
mov r8d, 4
je 0x140006a95
mov rcx, rax
call fcn.140011e20
cdqe
add rsp, 0x38
ret
mov rcx, qword [rax]
lea r9, [rsp + 0x50]
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
movsxd rax, dword [rsp + 0x50]
add rsp, 0x38
ret