joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403886
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov dword [ebp - 0x38], 0
mov dword [s.st_ctime], 0
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 8]
test eax, eax
jne 0x4038ae
mov eax, 0
jmp 0x4039f2
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0xc]
lea edx, [ebp - 0x34]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._stat
test eax, eax
je 0x4038ed
mov eax, dword [ebp + 0xc]
movzx eax, word [eax]
movzx eax, ax
mov dword [esp + 8], str.Error_opening_file_for_reading
mov dword [esp + 4], 0xffff
mov dword [esp], eax
call dbg.command_packet_create_error_response
jmp 0x4039f2
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x42333f
mov dword [esp + 4], eax
lea eax, [ebp - 0x38]
mov dword [esp], eax
mov eax, dword [sym.imp.msvcrt.dll_fopen_s]
call eax
mov eax, dword [ebp - 0x38]
test eax, eax
jne 0x403939
mov eax, dword [ebp + 0xc]
movzx eax, word [eax]
movzx eax, ax
mov dword [esp + 8], str.Error_opening_file_for_reading
mov dword [esp + 4], 0xffff
mov dword [esp], eax
call dbg.command_packet_create_error_response
jmp 0x4039f2
mov eax, dword [s.st_gid]
mov dword [esp + 8], 0x47
mov dword [esp + 4], str.drivers_command_commands_standard.h
mov dword [esp], eax
call dbg.safe_malloc_internal
mov dword [s.st_mtime], eax
mov eax, dword [ebp - 0x38]
mov edx, dword [s.st_gid]
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
mov dword [esp + 4], 1
mov eax, dword [s.st_mtime]
mov dword [esp], eax
call sym._fread
mov edx, dword [s.st_gid]
cmp eax, edx
jne 0x4039a5
mov eax, dword [s.st_gid]
mov edx, eax
mov eax, dword [ebp + 0xc]
movzx eax, word [eax]
movzx eax, ax
mov dword [esp + 8], edx
mov edx, dword [s.st_mtime]
mov dword [esp + 4], edx
mov dword [esp], eax
call dbg.command_packet_create_download_response
mov dword [s.st_ctime], eax
jmp 0x4039c9
mov eax, dword [ebp + 0xc]
movzx eax, word [eax]
movzx eax, ax
mov dword [esp + 8], str.There_was_an_error_reading_the_file
mov dword [esp + 4], 0xffff
mov dword [esp], eax
call dbg.command_packet_create_error_response
mov dword [s.st_ctime], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call sym._fclose
mov dword [esp + 8], 0x4e
mov dword [esp + 4], str.drivers_command_commands_standard.h
mov eax, dword [s.st_mtime]
mov dword [esp], eax
call dbg.safe_free_internal
mov eax, dword [s.st_ctime]
leave
ret
Function at 0x4039f4
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 8]
test eax, eax
jne 0x403a0e
mov eax, 0
jmp 0x403a9a
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x42338c
mov dword [esp + 4], eax
lea eax, [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.msvcrt.dll_fopen_s]
call eax
mov eax, dword [ebp - 0xc]
test eax, eax
jne 0x403a57
mov eax, dword [ebp + 0xc]
movzx eax, word [eax]
movzx eax, ax
mov dword [esp + 8], str.Error_opening_file_for_writing
mov dword [esp + 4], 0xffff
mov dword [esp], eax
call dbg.command_packet_create_error_response
jmp 0x403a9a
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 0xc]
mov edx, dword [eax + 0x14]
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x10]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], 1
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._fwrite
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._fclose
mov eax, dword [ebp + 0xc]
movzx eax, word [eax]
movzx eax, ax
mov dword [esp], eax
call dbg.command_packet_create_upload_response
leave
ret

Function at 0x405c28
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x14]
mov dword [esp + 0x10], 0
lea edx, [ebp - 0xc]
mov dword [esp + 0xc], edx
mov edx, dword [ebp + 0x10]
mov dword [esp + 8], edx
mov edx, dword [ebp + 0xc]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_WriteFile]
call eax
sub esp, 0x14
nop
leave
ret
Function at 0x405fd8
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x24]
mov dword [esp + 4], 2
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_TerminateProcess]
call eax
sub esp, 8
mov eax, dword [ebp + 8]
mov dword [eax + 0xc], 1
nop
leave
ret

Function at 0x409048
Capabilities:
Generate random numbers via winapi

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [esp + 0x10], 0xf0000000
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp + 4], 0
lea eax, [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
call eax
sub esp, 0x14
test eax, eax
jne 0x409089
mov eax, 0
jmp 0x4090c4
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp + 8]
mov dword [esp + 8], edx
mov edx, dword [ebp + 0xc]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
call eax
sub esp, 0xc
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], 0
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
call eax
sub esp, 8
mov eax, 1
leave
ret

Function at 0x40e46a
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov dword [ebp - 0x18], 0x61707865
mov dword [ebp - 0x14], 0x3120646e
mov dword [ebp - 0x10], 0x79622d36
mov dword [ebp - 0xc], 0x6b206574
mov dword [ebp - 4], 0
jmp 0x40e4eb
mov dword [ebp - 8], 0
jmp 0x40e4e1
mov ecx, dword [ebp - 4]
mov edx, 0x66666667
mov eax, ecx
imul edx
sar edx, 3
mov eax, ecx
sar eax, 0x1f
mov ecx, edx
sub ecx, eax
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 8]
add eax, edx
mov edx, eax
mov eax, dword [ebp + 0x10]
add edx, eax
lea eax, [ecx*4]
lea ecx, [ebp + eax]
mov eax, dword [ebp - 8]
add eax, ecx
sub eax, 0x18
movzx eax, byte [eax]
mov byte [edx], al
add dword [ebp - 8], 1
cmp dword [ebp - 8], 3
jle 0x40e49e
add dword [ebp - 4], 0x14
cmp dword [ebp - 4], 0x3f
jle 0x40e495
mov dword [ebp - 4], 0
jmp 0x40e54c
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 8]
add eax, edx
mov edx, dword [ebp - 4]
add edx, 4
mov ecx, edx
mov edx, dword [ebp + 0x10]
add edx, ecx
movzx eax, byte [eax]
mov byte [edx], al
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 8]
add eax, edx
mov edx, dword [ebp - 4]
add edx, 0x2c
mov ecx, edx
mov edx, dword [ebp + 0x10]
add edx, ecx
movzx eax, byte [eax]
mov byte [edx], al
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 0xc]
add eax, edx
mov edx, dword [ebp - 4]
add edx, 0x18
mov ecx, edx
mov edx, dword [ebp + 0x10]
add edx, ecx
movzx eax, byte [eax]
mov byte [edx], al
add dword [ebp - 4], 1
cmp dword [ebp - 4], 0xf
jle 0x40e4fa
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call dbg.s20_hash
nop
leave
ret
Function at 0x40e560
Capabilities:
Contain obfuscated stackstrings
Encrypt data using salsa20 or chacha

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov dword [ebp - 0x18], 0x61707865
mov dword [ebp - 0x14], 0x3320646e
mov dword [ebp - 0x10], 0x79622d32
mov dword [ebp - 0xc], 0x6b206574
mov dword [ebp - 4], 0
jmp 0x40e5e1
mov dword [ebp - 8], 0
jmp 0x40e5d7
mov ecx, dword [ebp - 4]
mov edx, 0x66666667
mov eax, ecx
imul edx
sar edx, 3
mov eax, ecx
sar eax, 0x1f
mov ecx, edx
sub ecx, eax
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 8]
add eax, edx
mov edx, eax
mov eax, dword [ebp + 0x10]
add edx, eax
lea eax, [ecx*4]
lea ecx, [ebp + eax]
mov eax, dword [ebp - 8]
add eax, ecx
sub eax, 0x18
movzx eax, byte [eax]
mov byte [edx], al
add dword [ebp - 8], 1
cmp dword [ebp - 8], 3
jle 0x40e594
add dword [ebp - 4], 0x14
cmp dword [ebp - 4], 0x3f
jle 0x40e58b
mov dword [ebp - 4], 0
jmp 0x40e645
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 8]
add eax, edx
mov edx, dword [ebp - 4]
add edx, 4
mov ecx, edx
mov edx, dword [ebp + 0x10]
add edx, ecx
movzx eax, byte [eax]
mov byte [edx], al
mov eax, dword [ebp - 4]
lea edx, [eax + 0x10]
mov eax, dword [ebp + 8]
add eax, edx
mov edx, dword [ebp - 4]
add edx, 0x2c
mov ecx, edx
mov edx, dword [ebp + 0x10]
add edx, ecx
movzx eax, byte [eax]
mov byte [edx], al
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 0xc]
add eax, edx
mov edx, dword [ebp - 4]
add edx, 0x18
mov ecx, edx
mov edx, dword [ebp + 0x10]
add edx, ecx
movzx eax, byte [eax]
mov byte [edx], al
add dword [ebp - 4], 1
cmp dword [ebp - 4], 0xf
jle 0x40e5f0
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call dbg.s20_hash
nop
leave
ret
Function at 0x41657e
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x438
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
mov dword [ebp - 0xc], eax
mov dword [esp + 8], 0x298
mov dword [esp + 4], str.libs_select_group.c
mov eax, dword [ebp + 8]
mov dword [esp], eax
call dbg.safe_free_internal
mov dword [ebp - 0x10], 0
mov dword [esp], 0xfffffff6
mov eax, dword [sym.imp.KERNEL32.dll_GetStdHandle]
call eax
sub esp, 4
mov dword [esp + 0x10], 0
lea edx, [ebp - 0x414]
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0x400
lea edx, [ebp - 0x410]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_ReadFile]
call eax
sub esp, 0x14
test eax, eax
jne 0x41662d
mov dword [esp], 2
mov eax, dword [dbg.__acrt_iob_func]
call eax
mov dword [esp + 4], str.No_more_data_from_stdin_n
mov dword [esp], eax
call sym._fprintf_4
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, 0
jmp 0x41667c
mov eax, dword [ebp - 0x414]
mov dword [esp + 0x10], 0
lea edx, [ebp - 0x418]
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
lea eax, [ebp - 0x410]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_WriteFile]
call eax
sub esp, 0x14
test eax, eax
jne 0x4165b2
mov dword [esp], str.stdin:_Couldnt_write_to_stdin_pipe
call dbg.nbdie
jmp 0x4165b2
leave
ret 4

Function at 0x416680
Capabilities:
Create pipe
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [esp + 8], 0x2b5
mov dword [esp + 4], str.libs_select_group.c
mov dword [esp], 8
call dbg.safe_malloc_internal
mov dword [ebp - 0xc], eax
mov eax, dword [global_handle]
test eax, eax
je 0x4166b8
mov eax, dword [global_handle]
jmp 0x416748
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
lea eax, [ebp - 0x18]
mov dword [esp + 4], eax
lea eax, [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CreatePipe]
call eax
sub esp, 0x10
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0xc]
mov dword [eax], edx
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0xc]
mov dword [eax + 4], edx
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov eax, dword [ebp - 0xc]
mov dword [esp + 0xc], eax
mov dword [esp + 8], dbg.stdin_thread
mov dword [esp + 4], 0
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.dll_CreateThread]
call eax
sub esp, 0x18
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x41673d
mov dword [esp], str.stdin:_Couldnt_create_thread
call dbg.nbdie
mov eax, dword [ebp - 0x14]
mov dword [global_handle], eax
mov eax, dword [ebp - 0x14]
leave
ret
Function at 0x41674c
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1b8
mov word [ebp - 0xa], 0x202
movzx eax, word [ebp - 0xa]
lea edx, [ebp - 0x1a0]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_WSAStartup]
call eax
sub esp, 8
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0x276c
je 0x4167cf
cmp dword [ebp - 0x10], 0x276c
jg 0x4167ff
cmp dword [ebp - 0x10], 0x276b
je 0x4167c3
cmp dword [ebp - 0x10], 0x276b
jg 0x4167ff
cmp dword [ebp - 0x10], 0x2753
je 0x4167e7
cmp dword [ebp - 0x10], 0x2753
jg 0x4167ff
cmp dword [ebp - 0x10], 0x271e
je 0x4167f3
cmp dword [ebp - 0x10], 0x2734
je 0x4167db
jmp 0x4167ff
mov dword [esp], 1
call sym._exit
mov dword [esp], 1
call sym._exit
mov dword [esp], 1
call sym._exit
mov dword [esp], 1
call sym._exit
mov dword [esp], 1
call sym._exit
nop
leave
ret

Function at 0x416802
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [ebp + 0xc]
mov word [ebp - 0x2c], ax
mov dword [esp + 8], 6
mov dword [esp + 4], 1
mov dword [esp], 2
mov eax, dword [sym.imp.WS2_32.dll_socket]
call eax
sub esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
jne 0x416845
mov dword [esp], str.tcp:_couldnt_create_socket
call dbg.nbdie
cmp dword [ebp + 0x10], 0
je 0x416871
mov dword [ebp - 0x28], 1
mov eax, dword [ebp - 0xc]
lea edx, [ebp - 0x28]
mov dword [esp + 8], edx
mov dword [esp + 4], 0x8004667e
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_ioctlsocket]
call eax
sub esp, 0xc
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_gethostbyname]
call eax
sub esp, 4
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x416894
mov eax, 0xffffffff
jmp 0x41693e
mov dword [esp + 8], 0x10
mov dword [esp + 4], 0
lea eax, [ebp - 0x24]
mov dword [esp], eax
call sym._memset
mov word [ebp - 0x24], 2
movzx eax, word [ebp - 0x2c]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_htons]
call eax
sub esp, 4
mov word [ebp - 0x22], ax
mov eax, dword [ebp - 0x10]
movzx eax, word [eax + 0xa]
movsx edx, ax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
lea eax, [ebp - 0x24]
add eax, 4
mov dword [esp], eax
call sym._memcpy
mov eax, dword [ebp - 0xc]
mov dword [esp + 8], 0x10
lea edx, [ebp - 0x24]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_connect]
call eax
sub esp, 0xc
mov dword [.sin_zero], eax
cmp dword [.sin_zero], 0
jns 0x41693b
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
cmp eax, 0x2733
je 0x41693b
mov dword [esp], str.tcp:_couldnt_connect_to_host
call dbg.nberror
mov eax, 0xffffffff
jmp 0x41693e
mov eax, dword [ebp - 0xc]
leave
ret
Function at 0x41697c
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [ebp + 0xc]
mov word [ebp - 0x2c], ax
mov dword [esp + 8], 0x10
mov dword [esp + 4], 0
lea eax, [ebp - 0x1c]
mov dword [esp], eax
call sym._memset
mov word [ebp - 0x1c], 2
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_inet_addr]
call eax
sub esp, 4
mov dword [ebp - 0x18], eax
movzx eax, word [ebp - 0x2c]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_htons]
call eax
sub esp, 4
mov word [ebp - 0x1a], ax
mov eax, dword [ebp - 0x18]
cmp eax, 0xffffffff
jne 0x4169e6
mov dword [esp], str.tcp:_couldnt_parse_local_address
call dbg.nbdie
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 2
mov eax, dword [sym.imp.WS2_32.dll_socket]
call eax
sub esp, 0xc
mov dword [.sin_zero], eax
cmp dword [.sin_zero], 0
jns 0x416a1e
mov dword [esp], str.tcp:_couldnt_create_socket
call dbg.nbdie
jmp 0x416a75
mov eax, dword [.sin_zero]
mov dword [esp + 8], 0x10
lea edx, [ebp - 0x1c]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_bind]
call eax
sub esp, 0xc
test eax, eax
jns 0x416a4d
mov dword [esp], str.tcp:_couldnt_bind_to_socket
call dbg.nbdie
mov eax, dword [.sin_zero]
mov dword [esp + 4], 0x14
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_listen]
call eax
sub esp, 8
test eax, eax
jns 0x416a75
mov dword [esp], str.tcp:_couldnt_listen_on_socket
call dbg.nbdie
mov eax, dword [.sin_zero]
leave
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], 0
mov dword [esp + 8], edx
mov edx, dword [ebp + 0xc]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_send]
call eax
sub esp, 0x10
leave
ret

Function at 0x416b1c
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], 0
mov dword [esp + 8], edx
mov edx, dword [ebp + 0xc]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_recv]
call eax
sub esp, 0x10
leave
ret
Function at 0x416d85
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [ebp + 8]
mov word [ebp - 0x2c], ax
mov dword [sox.sin_zero], 1
mov dword [esp + 8], 0x11
mov dword [esp + 4], 2
mov dword [esp], 2
mov eax, dword [sym.imp.WS2_32.dll_socket]
call eax
sub esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jns 0x416dcf
mov dword [esp], str.udp:_couldnt_create_socket
call dbg.nbdie
mov eax, dword [ebp - 0xc]
mov dword [esp + 0x10], 4
lea edx, [sox.sin_zero]
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0x20
mov dword [esp + 4], 0xffff
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_setsockopt]
call eax
sub esp, 0x14
test eax, eax
jns 0x416e0e
mov dword [esp], str.udp:_couldnt_set_socket_to_SO_BROADCAST
call dbg.nbdie
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_inet_addr]
call eax
sub esp, 4
mov dword [ebp - 0x1c], eax
mov word [ebp - 0x20], 2
movzx eax, word [ebp - 0x2c]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_htons]
call eax
sub esp, 4
mov word [ebp - 0x1e], ax
mov eax, dword [ebp - 0x1c]
cmp eax, 0xffffffff
jne 0x416e50
mov dword [esp], str.udp:_couldnt_parse_local_address
call dbg.nbdie
mov eax, dword [ebp - 0xc]
mov dword [esp + 8], 0x10
lea edx, [ebp - 0x20]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_bind]
call eax
sub esp, 0xc
test eax, eax
jns 0x416e7f
mov dword [esp], str.udp:_couldnt_bind_to_port__are_you_running_as_root__
call dbg.nbdie
mov eax, dword [ebp - 0xc]
leave
ret

Function at 0x416e84
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [ebp - 0x10], 0x10
mov dword [esp + 8], 0x10
mov dword [esp + 4], 0
mov eax, dword [ebp + 0x14]
mov dword [esp], eax
call sym._memset
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x10]
mov dword [esp + 0x14], ecx
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], 0
mov dword [esp + 8], edx
mov edx, dword [ebp + 0xc]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_recvfrom]
call eax
sub esp, 0x18
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jns 0x416ef5
mov dword [esp], str.udp:_couldnt_receive_data
call dbg.nbdie
mov eax, dword [ebp - 0xc]
leave
ret
Function at 0x416efa
Capabilities:
Resolve dns
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [ebp + 0x10]
mov word [ebp - 0x2c], ax
mov dword [ebp - 0xc], 0xffffffff
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_gethostbyname]
call eax
sub esp, 4
mov dword [serv_addr.sin_zero], eax
cmp dword [serv_addr.sin_zero], 0
jne 0x416f51
mov dword [esp], 2
mov eax, dword [dbg.__acrt_iob_func]
call eax
mov edx, dword [ebp + 0xc]
mov dword [esp + 8], edx
mov dword [esp + 4], str.Couldnt_find_host__s_n
mov dword [esp], eax
call sym._fprintf_6
jmp 0x416ff9
mov dword [esp + 8], 0x10
mov dword [esp + 4], 0
lea eax, [ebp - 0x20]
mov dword [esp], eax
call sym._memset
mov word [ebp - 0x20], 2
movzx eax, word [ebp - 0x2c]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_htons]
call eax
sub esp, 4
mov word [ebp - 0x1e], ax
mov eax, dword [serv_addr.sin_zero]
movzx eax, word [eax + 0xa]
movsx edx, ax
mov eax, dword [serv_addr.sin_zero]
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
lea eax, [ebp - 0x20]
add eax, 4
mov dword [esp], eax
call sym._memcpy
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp + 8]
mov dword [esp + 0x14], 0x10
lea ecx, [ebp - 0x20]
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], 0
mov dword [esp + 8], edx
mov edx, dword [ebp + 0x14]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_sendto]
call eax
sub esp, 0x18
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jns 0x416ff9
mov dword [esp], str.udp:_couldnt_send_data
call dbg.nbdie
mov eax, dword [ebp - 0xc]
leave
ret

Function at 0x41a1e0
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call dbg.__acrt_iob_func
mov dword [esp + 8], 0x1b
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sym._fwrite
mov dword [esp], 2
call dbg.__acrt_iob_func
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sym._vfprintf_1
call sym._abort
lea esi, [esi]
Function at 0x41a240
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x42d0ac]
test esi, esi
jle 0x41a360
mov eax, dword [0x42d0b0]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp ebx, edx
jb 0x41a274
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x41a2f7
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x41a260
mov dword [esp], ebx
call dbg.__mingw_GetSectionForAddress
mov edi, eax
test eax, eax
je 0x41a387
mov eax, dword [0x42d0b0]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call dbg._GetPEImageBase
mov edx, dword [0x42d0b0]
add eax, dword [edi + 0xc]
mov dword [edx + ebx + 0xc], eax
lea edx, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x41a367
mov eax, dword [esp + 0x28]
lea edx, [eax - 4]
and edx, 0xfffffffb
je 0x41a2f0
lea edx, [eax - 0x40]
and edx, 0xffffffbf
jne 0x41a300
add dword [0x42d0ac], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
cmp eax, 2
mov edx, 4
mov eax, 0x40
mov ecx, dword [esp + 0x20]
cmove eax, edx
mov edx, dword [esp + 0x14]
add ebx, dword [0x42d0b0]
mov dword [ebx + 8], ecx
mov dword [ebx + 4], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x41a2f0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call dbg.__report_error
lea esi, cs:[esi]
nop
xor esi, esi
jmp 0x41a27e
mov eax, dword [0x42d0b0]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call dbg.__report_error
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call dbg.__report_error
lea esi, cs:[esi]
nop

Function at 0x41a8b0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x42d0c8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x42d0c0]
sub esp, 4
test ebx, ebx
je 0x41a905
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
mov esi, eax
sub esp, 4
call edi
test esi, esi
je 0x41a8fe
test eax, eax
jne 0x41a8fe
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x41a8e0
mov dword [esp], 0x42d0c8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x41ac40
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x400000], 0x5a4d
jne 0x41ac65
mov ecx, dword [0x40003c]
cmp dword [ecx + 0x400000], 0x4550
lea edx, [ecx + 0x400000]
je 0x41ac70
ret
cmp word [ecx + 0x400018], 0x10b
jne 0x41ac65
push esi
movzx eax, word [ecx + 0x400014]
push ebx
movzx esi, word [ecx + 0x400006]
mov ebx, dword [esp + 0xc]
lea eax, [edx + eax + 0x18]
sub ebx, 0x400000
test si, si
je 0x41acb8
xor ecx, ecx
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x41acae
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x41acba
add ecx, 1
add eax, 0x28
cmp esi, ecx
jne 0x41aca0
xor eax, eax
pop ebx
pop esi
ret