joyce8/EMBER2024-capa huggingface dataset:
Function at 0x435e90
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x134
mov eax, dword [0x510140]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0
push 2
mov ebx, ecx
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov edi, eax
mov dword [ebp - 0x130], 0x128
lea eax, [ebp - 0x130]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_Process32First]
mov edx, ebx
lea ecx, [ebp - 0x10c]
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x435ef4
test al, al
je 0x435ef0
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x435ef4
add ecx, 2
add edx, 2
test al, al
jne 0x435ed4
xor eax, eax
jmp 0x435ef9
sbb eax, eax
or eax, 1
test eax, eax
je 0x435f49
mov esi, dword [sym.imp.KERNEL32.dll_Process32Next]
lea eax, [ebp - 0x130]
push eax
push edi
call esi
test eax, eax
je 0x435f5c
mov eax, ebx
lea ecx, [ebp - 0x10c]
nop dword [eax]
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x435f40
test dl, dl
je 0x435f3c
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x435f40
add ecx, 2
add eax, 2
test dl, dl
jne 0x435f20
xor eax, eax
jmp 0x435f45
sbb eax, eax
or eax, 1
test eax, eax
jne 0x435f03
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a1871
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004a1871
mov esp, ebp
pop ebp
ret

Function at 0x435f70
Capabilities:
Terminate process

Disassembly:
push ecx
push eax
xor eax, eax
setnp al
push edx
xor edx, eax
shl edx, 2
xchg edx, eax
pop edx
or eax, ecx
pop eax
mov ecx, str.ollydbg.exe
call fcn.00435e90
test al, al
jne 0x436005
mov ecx, str.idaq64.exe
call fcn.00435e90
test al, al
jne 0x436005
mov ecx, str.HxD.exe
call fcn.00435e90
test al, al
jne 0x436005
mov ecx, str.ResourceHacker.exe
call fcn.00435e90
test al, al
jne 0x436005
mov ecx, str.ProcessHacker.exe
call fcn.00435e90
test al, al
jne 0x436005
mov ecx, str.idaq32.exe
call fcn.00435e90
test al, al
jne 0x436005
mov ecx, str.httpdebugger.exe
call fcn.00435e90
test al, al
jne 0x436005
mov ecx, str.windowrenamer.exe
call fcn.00435e90
test al, al
jne 0x436005
push eax
xor eax, eax
setnp al
push edx
xor edx, eax
shl edx, 2
xchg edx, eax
pop edx
or eax, ecx
pop eax
pop ecx
ret
push 0xffffffffffffffff
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
Function at 0x436010
Capabilities:
Get token membership

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x510140]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0xc], 0
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0x220
push 0x20
push 2
lea eax, [ebp - 0xc]
mov word [ebp - 8], 0x500
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x436062
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a1871
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
push dword [ebp - 0x14]
push 0
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
test eax, eax
jne 0x43607f
mov dword [ebp - 0x10], eax
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a1871
mov esp, ebp
pop ebp
ret

Function at 0x4360a0
Capabilities:
Hide thread from debugger

Disassembly:
push esi
push eax
xor eax, eax
setnp al
push edx
xor edx, eax
shl edx, 2
xchg edx, eax
pop edx
or eax, ecx
pop eax
push 0x4b58c0
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.NtSetInformationThread
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0
push 0
push 0x11
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call esi
push eax
xor eax, eax
setnp al
push edx
xor edx, eax
shl edx, 2
xchg edx, eax
pop edx
or eax, ecx
pop eax
pop esi
ret
Function at 0x43ae10
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx + 0x38], 0
je 0x43ae3c
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 edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x20]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x20], esi
mov ecx, dword [eax]
lea eax, [ebx + 0x30]
mov dword [esp + 0x24], edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
test ecx, ecx
je 0x43ae64
mov eax, dword [eax]
mov ecx, dword [eax]
jmp 0x43ae6a
xor ecx, ecx
mov dword [esp + 0x18], eax
mov eax, ecx
cdq
mov dword [esp + 0x10], eax
mov ecx, edx
mov dword [esp + 0x14], ecx
test edi, edi
jl 0x43aed2
jg 0x43ae81
test esi, esi
je 0x43aed2
test ecx, ecx
jl 0x43aecd
jg 0x43ae8b
test eax, eax
je 0x43aecd
cmp edi, ecx
jg 0x43ae9f
jl 0x43ae95
cmp esi, eax
jae 0x43ae9f
mov eax, esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edi
push eax
push dword [ebp + 8]
push dword [esp + 0x24]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x24]
add esp, 0xc
mov edx, dword [esp + 0x10]
mov ecx, dword [ebp + 8]
add ecx, edx
sub esi, edx
mov eax, dword [eax]
sbb edi, dword [esp + 0x14]
sub dword [eax], edx
mov eax, dword [ebx + 0x20]
add dword [eax], edx
jmp 0x43aed5
mov ecx, dword [ebp + 8]
jmp 0x43aedf
mov ecx, dword [ebp + 8]
test edi, edi
jl 0x43aef9
jg 0x43aedf
test esi, esi
je 0x43aef9
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x43aef9
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 [esp + 0x20]
mov edx, dword [esp + 0x24]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x43af20
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 4], esi
test eax, eax
jg 0x43af4c
jl 0x43af40
test ecx, ecx
jne 0x43af4c
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x43af65
push eax
push ecx
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
mov eax, dword [ebx + 0x1c]
push edi
mov edi, ecx
mov eax, dword [eax]
mov dword [ebp - 8], eax
test eax, eax
je 0x43afad
mov eax, dword [ebx + 0x2c]
lea edx, [ebx + 0x2c]
mov dword [ebp - 0xc], edx
mov eax, dword [eax]
test eax, eax
je 0x43afb3
cmp eax, ecx
mov esi, ecx
cmovb esi, eax
push esi
push dword [ebp - 8]
push dword [ebp - 4]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x2c]
sub edi, esi
add dword [ebp - 4], esi
add esp, 0xc
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, dword [ebp - 4]
jmp 0x43afb3
lea eax, [ebx + 0x2c]
mov dword [ebp - 0xc], eax
cmp dword [ebx + 0x4c], 0
je 0x43b026
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x43afdc
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
mov dword [eax], edx
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp edi, 0xfff
jbe 0x43b014
nop dword [eax]
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call eax
add esp, 0x10
add esi, eax
sub edi, eax
cmp eax, 0xfff
jne 0x43b026
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x43aff0
test edi, edi
je 0x43b026
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 0x43b3a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x510140]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x43b3d0
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a1871
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
push edi
mov ecx, dword [eax]
test ecx, ecx
je 0x43b40c
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x43b40c
lea ecx, [edi - 1]
mov eax, ebx
mov dword [edx], ecx
mov edx, dword [esi + 0x20]
pop edi
mov esi, dword [edx]
lea ecx, [esi + 1]
mov dword [edx], ecx
mov byte [esi], bl
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a1871
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
je 0x43b4e3
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x43b434
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x43b440
movsx eax, bl
jmp 0x43b478
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x25], bl
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x25]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
sub eax, 0
je 0x43b4a2
sub eax, 1
je 0x43b4a2
sub eax, 2
jne 0x43b4e3
movsx eax, byte [ebp - 0x25]
push dword [esi + 0x4c]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmove ebx, ecx
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a1871
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x43b4c0
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 0x43b4e3
lea ecx, [ebp - 0x25]
mov byte [esi + 0x3d], 1
or eax, 0xffffffff
cmp dword [ebp - 0x30], ecx
pop edi
pop esi
cmovne eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a1871
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004a1871
mov esp, ebp
pop ebp
ret 4
Function at 0x43d7d0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x510140]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x43d88c
cmp byte [esi + 0x3d], 0
je 0x43d88c
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x43d87a
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 0x43d841
sub eax, 1
je 0x43d845
sub eax, 2
jne 0x43d87a
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a1871
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x43d863
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 0x43d87a
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a1871
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a1871
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.004a1871
mov esp, ebp
pop ebp
ret

Function at 0x44ffd0
Capabilities:
Hash data using murmur3
Resolve function by parsing pe exports

Disassembly:
cmp byte [0x513694], 0
jne 0x44ffde
call fcn.00464640
cmp byte [0x51369d], 0
je 0x44fffc
push 0
push 0x40
push dword [esp + 0x10]
push dword [esp + 0x10]
call fcn.004649d0
add esp, 0x10
ret
jmp fcn.0044e380

Function at 0x466c80
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x194
mov eax, dword [0x510140]
xor eax, esp
mov dword [esp + 0x190], eax
lea eax, [esp]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x466cd5
mov eax, dword [esp]
cmp al, 2
jne 0x466ccf
shr eax, 8
cmp al, 2
jne 0x466ccf
call fcn.0046c3b0
mov ecx, dword [esp + 0x190]
xor ecx, esp
call fcn.004a1871
add esp, 0x194
ret
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [esp + 0x190]
mov eax, 2
xor ecx, esp
call fcn.004a1871
add esp, 0x194
ret

Function at 0x46cdc0
Capabilities:
Terminate process

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
je 0x46cddc
cmp dword [esi + 0x48], 0
je 0x46cddc
push 2
push 3
push esi
call fcn.00482900
add esp, 0xc
push dword [esp + 0xc]
call fcn.0047bb50
add esp, 4
test esi, esi
je 0x46cdfd
cmp dword [esi + 0x48], 0
je 0x46cdfd
push 3
push esi
call fcn.00482940
add esp, 8
pop esi
ret

Function at 0x46d540
Capabilities:
Create udp socket

Disassembly:
mov eax, dword [esp + 4]
cmp dword [eax + 0x3a8], 2
je fcn.0046d4f0
mov al, 1
ret
Function at 0x476680
Capabilities:
Write file on windows

Disassembly:
push edi
mov edi, dword [esp + 8]
lea eax, [esp + 0x10]
push eax
push dword [esp + 0x10]
push 0x4000
push dword [edi + 0x63c]
call fcn.00478b80
mov eax, dword [edi + 0x120]
add esp, 0x10
test eax, eax
je 0x4766d4
cmp byte [edi + 0x4690], 0
jne 0x4766d4
push dword [edi + 0x63c]
push 0x4ad834
push 0x100
push eax
call fcn.00478a90
add esp, 0x10
mov byte [edi + 0x4690], 1
cmp byte [edi + 0x350], 0
je 0x47675d
mov ecx, dword [edi + 0x63c]
push esi
mov esi, ecx
lea edx, [esi + 1]
nop dword [eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x4766f0
sub esi, edx
cmp esi, 0x3fff
jae 0x476710
mov byte [ecx + esi], 0xa
inc esi
mov eax, dword [edi + 0x63c]
mov byte [esi + eax], 0
mov eax, dword [edi + 0x190]
push ebx
mov ebx, dword [edi + 0x63c]
test eax, eax
je 0x476735
push dword [edi + 0x11c]
push esi
push ebx
push 0
push edi
call eax
add esp, 0x14
pop ebx
pop esi
pop edi
ret
push dword [edi + 0x118]
push 1
push 2
push 0x4ad81c
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
push dword [edi + 0x118]
push 1
push esi
push ebx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x20
pop ebx
pop esi
pop edi
ret

Function at 0x476760
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x808
mov eax, dword [0x510140]
xor eax, esp
mov dword [esp + 0x804], eax
push edi
mov edi, dword [esp + 0x810]
test edi, edi
je 0x476829
cmp byte [edi + 0x350], 0
je 0x476829
push esi
lea eax, [esp + 0x81c]
push eax
push dword [esp + 0x81c]
lea eax, [esp + 0x10]
push 0x801
push eax
call fcn.00478b80
lea esi, [esp + 0x18]
add esp, 0x10
lea ecx, [esi + 1]
nop word [eax + eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x4767c0
mov eax, dword [edi + 0x190]
sub esi, ecx
test eax, eax
je 0x4767fe
push dword [edi + 0x11c]
lea ecx, [esp + 0xc]
push esi
push ecx
push 0
push edi
call eax
add esp, 0x14
pop esi
pop edi
mov ecx, dword [esp + 0x804]
xor ecx, esp
call fcn.004a1871
add esp, 0x808
ret
push dword [edi + 0x118]
push 1
push 2
push 0x4ad81c
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
push dword [edi + 0x118]
lea eax, [esp + 0x1c]
push 1
push esi
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x20
pop esi
mov ecx, dword [esp + 0x808]
pop edi
xor ecx, esp
call fcn.004a1871
add esp, 0x808
ret

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

Disassembly:
mov eax, dword [esp + 8]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x14]
push eax
push edi
mov esi, dword [edi + eax*4 + 0x190]
call fcn.00476ec0
add esp, 8
push 0
push dword [esp + 0x24]
push dword [esp + 0x24]
push esi
call dword [sym.imp.WS2_32.dll_send]
mov ebp, dword [esp + 0x24]
mov ebx, eax
mov dword [ebp], 0
cmp ebx, 0xffffffff
jne 0x476b16
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
cmp esi, 0x2733
jne 0x476aee
pop edi
pop esi
mov dword [ebp], 0x51
xor eax, eax
pop ebp
pop ebx
ret
push esi
push edi
call fcn.004673a0
push eax
push str.Send_failure:__s
push dword [edi]
call fcn.00476680
mov eax, dword [edi]
add esp, 0x14
mov dword [eax + 0x4694], esi
mov eax, ebx
mov dword [ebp], 0x37
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x476ec0
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov ecx, dword [esp + 4]
mov edx, dword [esp + 8]
mov eax, edx
push ebx
push esi
shl eax, 4
lea esi, [ecx + 0x1b4]
mov ebx, dword [ecx + edx*4 + 0x190]
add esi, eax
mov eax, dword [ecx + 0x3a0]
push edi
mov edi, dword [esi + 4]
sub edi, dword [esi + 8]
test byte [eax + 0x3c], 3
je 0x476f70
cmp dword [ecx + edx*4 + 0x1a4], 0x4769f0
jne 0x476f70
cmp dword [esi], 0
je 0x476f07
test edi, edi
je 0x476f70
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push ebx
call fcn.00475fd0
add esp, 0x14
cmp eax, 0xffffffff
je 0x476f70
test al, 1
je 0x476f70
cmp dword [esi], 0
jne 0x476f59
push 0x8000
mov dword [esi + 4], 0x8000
call dword [0x5100d8]
mov edi, dword [esi + 4]
add esp, 4
mov dword [esi], eax
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
test eax, eax
jne 0x476f59
pop edi
mov dword [esi + 4], eax
pop esi
pop ebx
ret
mov eax, dword [esi]
add eax, dword [esi + 8]
push 0
push edi
push eax
push ebx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x476f70
add dword [esi + 8], eax
pop edi
pop esi
pop ebx
ret

Function at 0x476f80
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, dword [esp + 8]
mov eax, dword [esi + 0x190]
test eax, eax
je 0x476fa9
push dword [esi + 0x11c]
push dword [esp + 0x18]
push dword [esp + 0x18]
push dword [esp + 0x18]
push esi
call eax
add esp, 0x14
pop esi
ret
mov eax, dword [esp + 0xc]
cmp eax, 2
ja 0x476fe2
push dword [esi + 0x118]
lea eax, [eax + eax*2]
push 1
add eax, 0x4ad81c
push 2
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
push dword [esi + 0x118]
push 1
push dword [esp + 0x2c]
push dword [esp + 0x2c]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x20
xor eax, eax
pop esi
ret

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

Disassembly:
mov eax, dword [esp + 4]
cmp byte [eax + 0x1d4], 0
je 0x4770cd
push eax
call fcn.00456440
add esp, 4
test eax, eax
jne 0x4770ef
xor al, al
ret
mov eax, dword [eax + 0x190]
cmp eax, 0xffffffff
je 0x4770ca
push 2
push 1
lea ecx, [esp + 0xc]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jne 0x4770ef
xor al, al
ret
mov al, 1
ret

Function at 0x477a00
Capabilities:
Set socket configuration

Disassembly:
push esi
push edi
mov edi, dword [esp + 0xc]
lea eax, [esp + 0xc]
push 4
push eax
push 1
mov esi, dword [edi]
push 6
push dword [esp + 0x20]
mov dword [esp + 0x20], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x477a48
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.004673a0
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.00476760
add esp, 0x14
pop edi
pop esi
ret
push str.TCP_NODELAY_set_n
push esi
call fcn.00476760
add esp, 8
pop edi
pop esi
ret
Function at 0x477b50
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x108
mov eax, dword [0x510140]
xor eax, esp
mov dword [esp + 0x104], eax
push ebx
push edi
mov edi, dword [esp + 0x114]
cmp dword [edi + 0x8c], 2
mov ebx, dword [edi]
je 0x477d43
cmp byte [edi + 0x366], 0
push esi
jne 0x477d39
cmp byte [edi + 0x382], 0
jne 0x477d39
mov esi, dword [esp + 0x11c]
lea eax, [esp + 0xc]
push eax
lea eax, [esp + 0x94]
mov dword [esp + 0x10], 0x80
push eax
push esi
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x477bf5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push edi
call fcn.004673a0
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
push ebx
call fcn.00476680
add esp, 0x18
pop esi
pop edi
pop ebx
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.004a1871
add esp, 0x108
ret
push 0x80
lea eax, [esp + 0x14]
mov dword [esp + 0x10], 0x80
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [esp + 0xc]
push eax
lea eax, [esp + 0x14]
push eax
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x477c5d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push edi
call fcn.004673a0
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push ebx
call fcn.00476680
add esp, 0x18
pop esi
pop edi
pop ebx
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.004a1871
add esp, 0x108
ret
lea eax, [edi + 0x130]
push eax
lea esi, [edi + 0x102]
lea eax, [esp + 0x94]
push esi
push eax
call fcn.00478230
add esp, 0xc
test al, al
jne 0x477cb6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push edi
call fcn.004673a0
push eax
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push ebx
call fcn.00476680
add esp, 0x18
pop esi
pop edi
pop ebx
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.004a1871
add esp, 0x108
ret
movups xmm0, xmmword [esi]
mov eax, dword [esi + 0x28]
movups xmmword [edi + 0x58], xmm0
movups xmm0, xmmword [esi + 0x10]
movups xmmword [edi + 0x68], xmm0
movq xmm0, qword [esi + 0x20]
movq qword [edi + 0x78], xmm0
mov dword [edi + 0x80], eax
mov ax, word [esi + 0x2c]
mov word [edi + 0x84], ax
lea eax, [edi + 0x164]
push eax
lea eax, [edi + 0x134]
push eax
lea eax, [esp + 0x18]
push eax
call fcn.00478230
add esp, 0xc
test al, al
jne 0x477d39
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push edi
call fcn.004673a0
push eax
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push ebx
call fcn.00476680
add esp, 0x18
pop esi
pop edi
pop ebx
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.004a1871
add esp, 0x108
ret
push edi
call fcn.00477790
add esp, 4
pop esi
mov ecx, dword [esp + 0x10c]
pop edi
pop ebx
xor ecx, esp
call fcn.004a1871
add esp, 0x108
ret
Function at 0x4785b0
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x18
mov eax, dword [0x510140]
xor eax, esp
mov dword [esp + 0x14], eax
push esi
mov esi, dword [esp + 0x20]
xor eax, eax
push edi
mov edi, dword [esp + 0x28]
push 4
cmp byte [esi + 0x49c], al
setne al
mov dword [esp + 0xc], eax
lea eax, [esp + 0xc]
push eax
push 8
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x478610
push edi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.00476760
add esp, 0xc
pop edi
pop esi
mov ecx, dword [esp + 0x14]
xor ecx, esp
call fcn.004a1871
add esp, 0x18
ret
push dword [esi + 0x4a0]
mov dword [esp + 0x14], 1
call fcn.00481910
push dword [esi + 0x4a4]
imul eax, eax, 0x3e8
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], eax
call fcn.00481910
add esp, 8
imul eax, eax, 0x3e8
push 0
push 0
mov dword [esp + 0x10], eax
mov dword [esp + 0x20], eax
lea eax, [esp + 0x14]
push eax
push 0
push 0
push 0xc
lea eax, [esp + 0x28]
push eax
push 0x98000004
push edi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x478687
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
push esi
call fcn.00476760
add esp, 0x10
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
xor ecx, esp
call fcn.004a1871
add esp, 0x18
ret