joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4505a0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a01a6
mov eax, dword fs:[0]
push eax
sub esp, 0xdc
mov eax, dword [0xa57200]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc8], eax
mov eax, esi
mov byte [ebp - 0xc4], 0
cmp dword [esi + 0x14], 0xf
jbe 0x4505eb
mov eax, dword [esi]
push dword [ebp - 0xc4]
push dword [esi + 0x10]
push eax
lea eax, [ebp - 0xe8]
push eax
call fcn.0044c400
lea eax, [ebp - 0xd0]
mov dword [ebp - 4], 0
push eax
lea eax, [ebp - 0xe8]
mov dword [ebp - 0xd0], 0
push eax
mov dword [ebp - 0xcc], 0xa571f4
call fcn.00451030
add esp, 0x18
mov bl, al
cmp dword [ebp - 0xd0], 0
jne 0x4507ab
lea ecx, [ebp - 0xe8]
mov dword [ebp - 4], 0xffffffff
call fcn.00408550
test bl, bl
je 0x4506bc
cmp dword [esi + 0x14], 0xf
mov eax, esi
mov byte [ebp - 0xc4], 0
jbe 0x450668
mov eax, dword [esi]
push dword [ebp - 0xc4]
push dword [esi + 0x10]
push eax
lea eax, [ebp - 0xe8]
push eax
call fcn.0044c400
add esp, 0x10
cmp dword [ebp - 0xd4], 7
lea eax, [ebp - 0xe8]
mov dword [ebp - 4], 1
cmova eax, dword [ebp - 0xe8]
push eax
call fcn.00454450
test edx, edx
jne 0x4507c3
lea ecx, [ebp - 0xe8]
mov dword [ebp - 4], 0xffffffff
call fcn.00408550
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push 0xa
push dword [ebp - 0xc8]
mov edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov ebx, eax
test ebx, ebx
je 0x45078d
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x45078d
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push ebx
push edi
mov dword [ebp - 0xc8], eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, dword [ebp - 0xc8]
mov edi, eax
test ebx, ebx
je 0x45078d
test edi, edi
je 0x45078d
push 0xb0
lea eax, [ebp - 0xc0]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0xc0]
push 1
push 0x40
push 0x20
push esi
call fcn.0044d710
mov eax, dword [ebp - 0xc0]
lea ecx, [ebp - 0xc0]
mov dword [ebp - 4], 2
mov eax, dword [eax + 4]
add ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_bool___thiscall_std::ios_base::operator_bool_void_const]
lea ecx, [ebp - 0xc0]
test al, al
je 0x450788
push 0
push edi
push ebx
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::write_char_const___long_long___int64__]
lea ecx, [ebp - 0xc0]
call fcn.00450f00
lea ecx, [ebp - 0xc0]
call fcn.0044f030
mov al, 1
jmp 0x45078f
call fcn.0044f030
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00452bc2
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0xe8]
push eax
lea eax, [ebp - 0xd0]
push eax
push str.exists
call fcn.00450b70
lea eax, [ebp - 0xe8]
push eax
push edx
push 0x4dbfc0
call fcn.00450be0
int3
Function at 0x4507e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0xa57200]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x45089c
cmp byte [esi + 0x3d], 0
je 0x45089c
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x45088a
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x450851
sub eax, 1
je 0x450855
sub eax, 2
jne 0x45088a
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00452bc2
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x450873
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x45088a
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00452bc2
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00452bc2
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.00452bc2
mov esp, ebp
pop ebp
ret
Function at 0x452930
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 4], esi
test ecx, ecx
jg 0x45295a
jl 0x45294e
test eax, eax
jne 0x45295a
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x452973
push ecx
push eax
push esi
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push edi
mov ecx, ebx
mov edi, eax
call dword [sym.imp.MSVCP140.dll_protected:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Gnavail_void_const]
mov ecx, eax
test ecx, ecx
je 0x4529b8
mov esi, dword [ebp + 0xc]
cmp ecx, esi
cmovb esi, ecx
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::gptr_void_const]
mov edi, dword [ebp - 4]
push esi
push eax
push edi
call sub.VCRUNTIME140.dll_memcpy
add edi, esi
add esp, 0xc
mov dword [ebp - 4], edi
mov ecx, ebx
mov edi, dword [ebp + 0xc]
sub edi, esi
push esi
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::gbump_int_]
mov esi, dword [ebp - 4]
cmp dword [ebx + 0x4c], 0
je 0x452a28
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::eback_void_const]
lea ecx, [ebx + 0x3c]
cmp eax, ecx
jne 0x4529dd
push dword [ebx + 0x54]
mov eax, dword [ebx + 0x50]
mov ecx, ebx
push eax
push eax
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::setg_char___char___char__]
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov ecx, edi
cmp edi, 0xfff
jbe 0x452a16
nop dword [eax]
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call eax
sub edi, eax
add esp, 0x10
add esi, eax
mov ecx, edi
cmp eax, 0xfff
jne 0x452a28
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x4529f0
test ecx, ecx
je 0x452a28
push dword [ebx + 0x4c]
push edi
push 1
push esi
call eax
add esp, 0x10
sub edi, eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
pop edi
pop esi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x452a40
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, ecx
cmp dword [ebx + 0x38], 0
je 0x452a65
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const___long_long___int64__]
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], edi
call dword [sym.imp.MSVCP140.dll_protected:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pnavail_void_const]
mov dword [ebp + 0x10], eax
mov ecx, edx
mov dword [ebp - 4], ecx
test edi, edi
jl 0x452af7
jg 0x452a8b
test esi, esi
je 0x452af7
test ecx, ecx
jl 0x452ada
jg 0x452a95
test eax, eax
je 0x452ada
cmp edi, ecx
jg 0x452aa5
jl 0x452a9f
cmp esi, eax
jae 0x452aa5
mov dword [ebp + 0x10], esi
mov dword [ebp - 4], edi
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const]
push dword [ebp + 0x10]
push dword [ebp + 8]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp + 0x10]
add esp, 0xc
add dword [ebp + 8], eax
mov ecx, ebx
sub esi, eax
sbb edi, dword [ebp - 4]
push eax
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pbump_int_]
test edi, edi
jl 0x452af7
jg 0x452ada
test esi, esi
je 0x452af7
mov eax, dword [ebx + 0x4c]
mov ecx, dword [ebp + 8]
test eax, eax
je 0x452af7
push eax
push esi
push 1
push ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc

Function at 0x453d23
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x453d62
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x453d62
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x453d62
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x453d62
cmp dword [ecx + 0x74], 0xe
jbe 0x453d62
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x45400b
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
push ecx
push 2
lea eax, [ebp - 4]
push eax
push 0x20000001
push str._x_sys_default_locale
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
xor ecx, ecx
test eax, eax
jne 0x454032
mov eax, ecx
mov dword [ebp - 4], eax
jmp 0x454035
mov eax, dword [ebp - 4]
push esi
mov esi, dword [ebp + 0xc]
push ecx
push ecx
push esi
push eax
push dword [ebp + 8]
push ecx
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push eax
push dword [esi]
call fcn.00453fe7
pop esi
leave
ret 8
Function at 0x45dbf0
Capabilities:
Encode data using xor
Hash data using djb2

Disassembly:
sub esp, 0x18
mov eax, dword [0xa57200]
xor eax, esp
mov dword [esp + 0x14], eax
push esi
mov esi, dword [esp + 0x20]
test esi, esi
je 0x45dcbb
lea eax, [esp + 4]
push eax
push esi
push 2
call fcn.00478d00
add esp, 0xc
test eax, eax
jne 0x45dcbb
lea eax, [esp + 8]
push eax
push esi
push 0x17
call fcn.00478d00
add esp, 0xc
test eax, eax
jne 0x45dcbb
push ebx
push edi
mov edi, esi
xor ebx, ebx
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x45dc44
sub edi, ecx
push edi
push 0x2e
push esi
call fcn.00478cd0
add esp, 0xc
test eax, eax
je 0x45dc78
sub eax, esi
push eax
push 0x2e
push esi
call fcn.00478cd0
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x45dc7a
inc ebx
mov ecx, esi
sub ecx, ebx
add edi, ecx
test ebx, ebx
cmovne esi, ebx
mov ebx, 0x1505
add edi, esi
cmp esi, edi
jae 0x45dca6
mov al, byte [esi]
push eax
call fcn.0046bf60
movsx ecx, al
inc esi
mov eax, ebx
add esp, 4
shl eax, 5
add eax, ebx
xor ecx, eax
mov ebx, ecx
cmp esi, edi
jb 0x45dc88
pop edi
movzx eax, bl
pop ebx
pop esi
mov ecx, dword [esp + 0x14]
xor ecx, esp
call fcn.00452bc2
add esp, 0x18
ret
mov ecx, dword [esp + 0x18]
xor eax, eax
pop esi
xor ecx, esp
call fcn.00452bc2
add esp, 0x18
ret
Function at 0x467a80
Capabilities:
Write file on windows

Disassembly:
push esi
push edi
mov edi, dword [esp + 0xc]
cmp dword [edi + 0x608], 0
je 0x467ac4
push 1
push edi
call fcn.004598e0
push dword [edi + 0x59c]
mov eax, dword [edi + 0x608]
push dword [esp + 0x24]
push dword [esp + 0x24]
push dword [esp + 0x24]
push edi
call eax
push 0
push edi
mov esi, eax
call fcn.004598e0
add esp, 0x24
mov eax, esi
pop edi
pop esi
ret
mov edx, dword [esp + 0x10]
mov ecx, edx
sub ecx, 0
je 0x467ad9
sub ecx, 1
je 0x467ad9
sub ecx, 1
jne 0x467b0a
push dword [edi + 0x598]
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
lea eax, [edx*2 + 0x4df950]
push 1
add eax, edx
push 2
push eax
call esi
push dword [edi + 0x598]
push 1
push dword [esp + 0x30]
push dword [esp + 0x30]
call esi
add esp, 0x20
pop edi
xor eax, eax
pop esi
ret

Function at 0x468220
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
sub esp, 0x10c
mov eax, dword [0xa57200]
xor eax, esp
mov dword [esp + 0x108], eax
mov eax, dword [esp + 0x118]
mov edx, dword [esp + 0x114]
push ebx
mov ebx, dword [esp + 0x114]
mov dword [esp + 8], eax
xor eax, eax
push ebp
mov ebp, dword [esp + 0x128]
mov ecx, dword [ebx + 0x424]
cmp edx, ecx
push esi
sete al
mov esi, 0x448
push edi
lea eax, [eax*4 + 0x420]
mov eax, dword [eax + ebx]
mov dword [esp + 0x10], eax
mov eax, 0x458
cmove esi, eax
mov eax, dword [ebx + 0x548]
add esi, ebx
mov edi, dword [esi + 4]
sub edi, dword [esi + 8]
test byte [eax + 0x40], 3
je 0x46832e
xor eax, eax
cmp edx, ecx
sete al
lea eax, [eax*4 + 0x438]
cmp dword [eax + ebx], 0x467dd0
jne 0x46832e
cmp dword [esi], 0
je 0x4682b8
test edi, edi
je 0x46832e
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [esp + 0x20]
call fcn.004774b0
add esp, 0x14
cmp eax, 0xffffffff
je 0x46832e
test al, 1
je 0x46832e
mov ecx, dword [esi]
test ecx, ecx
jne 0x46830b
mov eax, dword [ebx]
mov eax, dword [eax + 0x90c]
add eax, eax
push eax
mov dword [esi + 4], eax
call dword [0xa57264]
mov edi, dword [esi + 4]
mov ecx, eax
add esp, 4
mov dword [esi], ecx
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
test ecx, ecx
je 0x468327
mov eax, dword [esi + 8]
push 0
push edi
add eax, ecx
push eax
push dword [esp + 0x1c]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x46832e
add dword [esi + 8], eax
jmp 0x46832e
mov dword [esi + 4], 0
push 0
push dword [esp + 0x130]
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call dword [sym.imp.WS2_32.dll_send]
mov edi, eax
cmp edi, 0xffffffff
jne 0x468397
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
cmp esi, 0x2733
jne 0x468368
mov dword [ebp], 0
lea eax, [edi + 0x52]
jmp 0x46839c
push 0x100
lea eax, [esp + 0x1c]
push eax
push esi
call fcn.00455170
push eax
push str.Send_failure:__s
push dword [ebx]
call fcn.00467b10
mov eax, dword [ebx]
add esp, 0x18
mov dword [eax + 0xd44], esi
mov eax, 0x37
jmp 0x468399
xor eax, eax
mov dword [ebp], edi
mov ecx, dword [esp + 0x118]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00452bc2
add esp, 0x10c
ret
Function at 0x4687d0
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov eax, dword [esp + 4]
cmp byte [eax + 0x474], 0
je 0x4687ed
push eax
call fcn.00462010
add esp, 4
test eax, eax
jne 0x46880c
xor al, al
ret
mov eax, dword [eax + 0x420]
cmp eax, 0xffffffff
je 0x4687ea
push 2
push 1
lea ecx, [esp + 0xc]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x4687ea
mov al, 1
ret
Function at 0x46a590
Capabilities:
Get common file path

Disassembly:
push ecx
push ebx
push edi
push str.kernel32
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ebx, eax
test ebx, ebx
jne 0x46a5aa
pop edi
pop ebx
pop ecx
ret
push ebp
push esi
push str.LoadLibraryExA
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, dword [esp + 0x18]
mov ebp, eax
push 0x4dfdc4
push esi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strpbrk]
add esp, 8
test eax, eax
je 0x46a5f3
test ebp, ebp
je 0x46a5e4
push 8
push 0
push esi
call ebp
pop esi
pop ebp
mov edi, eax
pop edi
pop ebx
pop ecx
ret
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
pop esi
pop ebp
mov edi, eax
pop edi
pop ebx
pop ecx
ret
test ebp, ebp
je 0x46a619
push str.AddDllDirectory
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x46a619
push 0x800
push 0
push esi
call ebp
pop esi
pop ebp
mov edi, eax
pop edi
pop ebx
pop ecx
ret
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edx, eax
mov dword [esp + 0x10], edx
test edx, edx
je 0x46a6cf
mov ecx, esi
lea ebx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x46a636
sub ecx, ebx
lea eax, [edx + 1]
add eax, ecx
push eax
call dword [0xa57264]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x46a6c5
push dword [esp + 0x10]
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x46a6c5
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x46a668
sub ecx, edx
mov eax, 0x5c
mov word [ecx + ebx], ax
mov ecx, ebx
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x46a680
sub ecx, edx
sub ecx, esi
add ecx, ebx
nop dword [eax]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x46a690
test ebp, ebp
je 0x46a6bc
push 8
push 0
push ebx
call ebp
push ebx
mov edi, eax
call dword [0xa57268]
add esp, 4
mov eax, edi
pop esi
pop ebp
pop edi
pop ebx
pop ecx
ret
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
push ebx
call dword [0xa57268]
add esp, 4
pop esi
pop ebp
mov eax, edi
pop edi
pop ebx
pop ecx
ret
Function at 0x46fb70
Capabilities:
Create udp socket

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
je 0x46fb84
mov eax, dword [eax]
mov eax, dword [eax + 0x78]
mov al, byte [eax + 0xe7]
ret
push 0
push 2
push 0x17
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
jne 0x46fb98
xor al, al
ret
push eax
push 0
call fcn.00468700
add esp, 8
mov al, 1
ret
Function at 0x4759d0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration
Start tcp server

Disassembly:
sub esp, 0x34
mov eax, dword [0xa57200]
xor eax, esp
mov dword [esp + 0x30], eax
push ebx
mov ebx, dword [esp + 0x48]
push esi
mov esi, dword [sym.imp.WS2_32.dll_socket]
push edi
push 6
push 1
push 2
mov dword [esp + 0x1c], 0x10
mov dword [esp + 0x18], 1
call esi
mov edi, eax
cmp edi, 0xffffffff
je 0x475bb6
xorps xmm0, xmm0
mov eax, 2
push 0x7f000001
movlpd qword [esp + 0x20], xmm0
mov word [esp + 0x18], ax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [esp + 0x18], eax
xor eax, eax
push 4
mov word [esp + 0x1a], ax
lea eax, [esp + 0x10]
push eax
push 4
push 0xffff
push edi
mov dword [ebx + 4], 0xffffffff
mov dword [ebx], 0xffffffff
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x475ba4
push 0x10
lea eax, [esp + 0x18]
push eax
push edi
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x475ba4
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x18]
push eax
push edi
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x475ba4
push 1
push edi
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x475ba4
push 0
push 1
push 2
call esi
mov dword [ebx], eax
cmp eax, 0xffffffff
je 0x475ba4
push 0x10
lea ecx, [esp + 0x18]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x475ba4
push 0
push 0
push edi
call dword [sym.imp.WS2_32.dll_accept]
mov dword [ebx + 4], eax
cmp eax, 0xffffffff
je 0x475ba4
push ebx
push 0x4e1688
lea eax, [esp + 0x2c]
push 0xc
push eax
call fcn.0046ac30
lea esi, [esp + 0x34]
add esp, 0x10
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x475b02
push 0
sub esi, ecx
lea eax, [esp + 0x28]
push esi
push eax
push dword [ebx]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, esi
jne 0x475ba4
push 0
push 0xc
lea eax, [esp + 0x38]
push eax
push dword [ebx + 4]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, esi
jne 0x475ba4
lea ecx, [esp + 0x24]
lea edx, [esp + 0x30]
sub esi, 4
jb 0x475b57
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x475b5c
add ecx, 4
add edx, 4
sub esi, 4
jae 0x475b46
cmp esi, 0xfffffffc
je 0x475b89
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x475ba4
cmp esi, 0xfffffffd
je 0x475b89
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x475ba4
cmp esi, 0xfffffffe
je 0x475b89
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x475ba4
cmp esi, 0xffffffff
je 0x475b89
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
jne 0x475ba4
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.00452bc2
add esp, 0x34
ret
mov esi, dword [sym.imp.WS2_32.dll_closesocket]
push edi
call esi
push dword [ebx]
call esi
push dword [ebx + 4]
call esi
mov ecx, dword [esp + 0x3c]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00452bc2
add esp, 0x34
ret
Function at 0x479a50
Capabilities:
Resolve dns

Disassembly:
sub esp, 0xc
mov eax, dword [esp + 0x1c]
push esi
xor esi, esi
mov dword [esp + 4], esi
mov dword [eax], esi
lea eax, [esp + 8]
push eax
push dword [esp + 0x20]
push dword [esp + 0x20]
push dword [esp + 0x20]
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [esp + 0xc], eax
test eax, eax
jne 0x479c02
push ebx
mov ebx, dword [esp + 0xc]
push edi
test ebx, ebx
je 0x479bec
push ebp
mov eax, dword [ebx + 4]
cmp eax, 2
jne 0x479a9f
lea ebp, [eax + 0xe]
jmp 0x479aab
cmp eax, 0x17
jne 0x479b59
lea ebp, [eax + 5]
cmp dword [ebx + 0x18], 0
je 0x479b59
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x479b59
cmp eax, ebp
jb 0x479b59
push 0x20
call dword [0xa57264]
mov edi, eax
add esp, 4
test edi, edi
je 0x479be1
mov ecx, dword [ebx]
mov dword [edi], ecx
mov ecx, dword [ebx + 4]
mov dword [edi + 4], ecx
mov ecx, dword [ebx + 8]
mov dword [edi + 8], ecx
mov eax, dword [ebx + 0xc]
push ebp
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], ebp
mov dword [edi + 0x18], 0
mov dword [edi + 0x14], 0
mov dword [edi + 0x1c], 0
call dword [0xa57264]
add esp, 4
mov dword [edi + 0x18], eax
test eax, eax
je 0x479bd0
push ebp
push dword [ebx + 0x18]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x14]
add esp, 0xc
test eax, eax
je 0x479b45
push eax
call dword [0xa57270]
add esp, 4
mov dword [edi + 0x14], eax
test eax, eax
je 0x479bb6
mov eax, dword [esp + 0x10]
test esi, esi
cmove esi, edi
test eax, eax
je 0x479b55
mov dword [eax + 0x1c], edi
mov dword [esp + 0x10], edi
mov ebx, dword [ebx + 0x1c]
test ebx, ebx
jne 0x479a92
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
pop ebp
test eax, eax
je 0x479b78
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
test ebx, ebx
je 0x479be8
test esi, esi
je 0x479ba5
push dword [esi + 0x18]
call dword [0xa57268]
push dword [esi + 0x14]
call dword [0xa57268]
mov edi, dword [esi + 0x1c]
push esi
call dword [0xa57268]
add esp, 0xc
mov esi, edi
test edi, edi
jne 0x479b80
mov eax, dword [esp + 0x28]
xor esi, esi
pop edi
mov dword [eax], esi
mov eax, ebx
pop ebx
pop esi
add esp, 0xc
ret
push dword [edi + 0x18]
mov ebx, 8
call dword [0xa57268]
push edi
call dword [0xa57268]
add esp, 8
jmp 0x479b68
push edi
mov ebx, 8
call dword [0xa57268]
add esp, 4
jmp 0x479b68
mov ebx, 8
jmp 0x479b68
test esi, esi
jne 0x479bf8
mov ebx, 0x2af9
push ebx
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [esp + 0x28]
pop edi
mov dword [eax], esi
mov eax, ebx
pop ebx
pop esi
add esp, 0xc
ret

Function at 0x47a060
Capabilities:
Create thread

Disassembly:
push 0
push 0
push dword [esp + 0x10]
push dword [esp + 0x10]
push 0
push 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
add esp, 0x18
test eax, eax
je 0x47a082
cmp eax, 0xffffffff
jne 0x47a084
xor eax, eax
ret