joyce8/EMBER2024-capa huggingface dataset:
Function at 0x496210
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov dword [ebp - 0x14], ecx
xor eax, eax
jne 0x496219
xor ecx, ecx
jne 0x496219
xor edx, edx
cmp dword [ebp + 0xc], 0
setne dl
mov dword [ebp - 0x10], edx
cmp dword [ebp - 0x10], 0
jne 0x49623d
push 0x80004005
call fcn.004067b0
xor eax, eax
jne 0x496221
mov dword [ebp - 4], 0
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
lea edx, [ecx + eax*2]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
lea edx, [ecx + eax*2]
mov dword [ebp - 4], edx
cmp dword [ebp - 0xc], 1
jne 0x49624e
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
push 7
push 0
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esp, ebp
pop ebp
ret 8

Function at 0x496470
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x228
mov dword [ebp - 0x228], ecx
lea ecx, [ebp - 0x10]
call fcn.00467c60
push 0x2001f
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x228]
mov edx, dword [ecx]
push edx
lea ecx, [ebp - 0x10]
call fcn.0045bb50
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x4964c6
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x21c], eax
lea ecx, [ebp - 0x10]
call fcn.0045bbe0
mov eax, dword [ebp - 0x21c]
jmp 0x496557
mov dword [ebp - 4], 0x100
lea ecx, [ebp - 0xc]
push ecx
push 0
push 0
push 0
lea edx, [ebp - 4]
push edx
lea eax, [ebp - 0x218]
push eax
push 0
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x49652c
lea edx, [ebp - 0x218]
push edx
lea ecx, [ebp - 0x10]
call fcn.00496470
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x496523
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x220], eax
lea ecx, [ebp - 0x10]
call fcn.0045bbe0
mov eax, dword [ebp - 0x220]
jmp 0x496557
mov dword [ebp - 4], 0x100
jmp 0x4964cd
lea ecx, [ebp - 0x10]
call fcn.0045bba0
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x228]
call fcn.004965b0
mov dword [ebp - 0x224], eax
lea ecx, [ebp - 0x10]
call fcn.0045bbe0
mov eax, dword [ebp - 0x224]
mov esp, ebp
pop ebp
ret 4
Function at 0x49c3a7
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov ecx, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], ebx
je 0x49c3e4
cmp dword [ebp + 0x14], edi
je 0x49c3e4
cmp ecx, edi
jne 0x49c3eb
call fcn.004a686e
push edi
push edi
push edi
push edi
mov dword [eax], 0x16
push edi
call fcn.0049cebb
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
mov esi, dword [ebp + 0x18]
cmp esi, edi
je 0x49c3ff
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
jbe 0x49c420
cmp ebx, 0xffffffff
je 0x49c40f
push ebx
push edi
push ecx
call fcn.0049e730
add esp, 0xc
cmp esi, edi
je 0x49c3cc
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
ja 0x49c3cc
mov edi, dword [ebp + 0x10]
imul edi, dword [ebp + 0x14]
test word [esi + 0xc], 0x10c
mov dword [ebp - 0x10], edi
mov ebx, edi
je 0x49c43c
mov eax, dword [esi + 0x18]
mov dword [ebp - 0xc], eax
jmp 0x49c443
mov dword [ebp - 0xc], 0x1000
test edi, edi
je 0x49c534
test word [esi + 0xc], 0x10c
je 0x49c497
mov eax, dword [esi + 4]
test eax, eax
je 0x49c497
jl 0x49c595
cmp ebx, eax
mov edi, ebx
jb 0x49c468
mov edi, eax
cmp edi, dword [ebp - 4]
ja 0x49c53c
push edi
push dword [esi]
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0049c7f6
sub dword [esi + 4], edi
add dword [esi], edi
add dword [ebp - 8], edi
sub ebx, edi
add esp, 0x10
sub dword [ebp - 4], edi
mov edi, dword [ebp - 0x10]
jmp 0x49c52c
cmp ebx, dword [ebp - 0xc]
jb 0x49c504
cmp dword [ebp - 0xc], 0
je 0x49c4c1
mov ecx, SysReAllocString
xor edx, edx
cmp ebx, ecx
jbe 0x49c4b6
mov eax, ecx
div dword [ebp - 0xc]
mov eax, ecx
jmp 0x49c4bd
mov eax, ebx
div dword [ebp - 0xc]
mov eax, ebx
sub eax, edx
jmp 0x49c4cc
mov eax, SysReAllocString
cmp ebx, eax
ja 0x49c4cc
mov eax, ebx
cmp eax, dword [ebp - 4]
ja 0x49c568
push eax
push dword [ebp - 8]
push esi
call fcn.004a1545
pop ecx
push eax
call fcn.004a9f3c
add esp, 0xc
test eax, eax
je 0x49c5a7
cmp eax, 0xffffffff
je 0x49c595
add dword [ebp - 8], eax
sub ebx, eax
sub dword [ebp - 4], eax
jmp 0x49c52c
push esi
call fcn.004a985b
cmp eax, 0xffffffff
pop ecx
je 0x49c599
cmp dword [ebp - 4], 0
je 0x49c568
mov ecx, dword [ebp - 8]
inc dword [ebp - 8]
mov byte [ecx], al
mov eax, dword [esi + 0x18]
dec ebx
dec dword [ebp - 4]
mov dword [ebp - 0xc], eax
test ebx, ebx
jne 0x49c44b
mov eax, dword [ebp + 0x14]
jmp 0x49c3e6
xor esi, esi
cmp dword [ebp + 0xc], 0xffffffff
je 0x49c553
push dword [ebp + 0xc]
push esi
push dword [ebp + 8]
call fcn.0049e730
add esp, 0xc
call fcn.004a686e
push esi
push esi
push esi
push esi
mov dword [eax], 0x22
push esi
jmp 0x49c3dc
cmp dword [ebp + 0xc], 0xffffffff
je 0x49c57e
push dword [ebp + 0xc]
push 0
push dword [ebp + 8]
call fcn.0049e730
add esp, 0xc
call fcn.004a686e
mov dword [eax], 0x22
xor eax, eax
push eax
push eax
push eax
push eax
push eax
jmp 0x49c3dc
or dword [esi + 0xc], 0x20
mov eax, edi
sub eax, ebx
xor edx, edx
div dword [ebp + 0x10]
jmp 0x49c3e6
or dword [esi + 0xc], 0x10
jmp 0x49c599
Function at 0x4a34fe
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
xor esi, esi
cmp dword [esp + 8], esi
jne 0x4a352b
call fcn.004a6881
mov dword [eax], esi
call fcn.004a686e
push esi
push esi
push esi
push esi
push esi
mov dword [eax], 0x16
call fcn.0049cebb
add esp, 0x14
push 0x16
pop eax
pop esi
ret
test dword [esp + 0xc], 0xfffffff9
jne 0x4a3507
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4a355a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004a6894
pop ecx
call fcn.004a686e
mov eax, dword [eax]
pop esi
ret
test al, 0x10
jne 0x4a3581
test al, 1
je 0x4a3581
test byte [esp + 0xc], 2
je 0x4a3581
call fcn.004a6881
mov dword [eax], 5
call fcn.004a686e
mov dword [eax], 0xd
jmp 0x4a3551
xor eax, eax
pop esi
ret

Function at 0x4a4277
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x55e2f8]
jne 0x4a4281
repz ret
jmp fcn.004b378c

Function at 0x4a6fc9
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
xor esi, esi
xor edi, edi
cmp ebx, dword [edi*8 + 0x55e308]
je 0x4a6fe4
inc edi
cmp edi, 0x17
jb 0x4a6fd5
cmp edi, 0x17
jae 0x4a7164
push ebp
push 3
call fcn.004b51d3
cmp eax, 1
pop ecx
je 0x4a7130
push 3
call fcn.004b51d3
test eax, eax
pop ecx
jne 0x4a7018
cmp dword [0x55e150], 1
je 0x4a7130
cmp ebx, 0xfc
je 0x4a7163
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x563628
push ebp
call fcn.004a3693
add esp, 0xc
test eax, eax
je 0x4a704e
push esi
push esi
push esi
push esi
push esi
call fcn.0049cdbf
add esp, 0x14
push 0x104
mov esi, 0x563641
push esi
push 0
mov byte [0x563745], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4a7092
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.004a3693
add esp, 0xc
test eax, eax
je 0x4a7092
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.0049cdbf
add esp, 0x14
push esi
call fcn.0049c9c0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x4a70d7
push esi
call fcn.0049c9c0
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x56393c
push 0x52cabc
sub ecx, eax
push ecx
push eax
call fcn.004a0e15
add esp, 0x14
test eax, eax
je 0x4a70d7
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.0049cdbf
add esp, 0x14
jmp 0x4a70d9
xor esi, esi
push 0x52cab8
push ebx
push ebp
call fcn.004b4401
add esp, 0xc
test eax, eax
je 0x4a70f9
push esi
push esi
push esi
push esi
push esi
call fcn.0049cdbf
add esp, 0x14
push dword [edi*8 + 0x55e30c]
push ebx
push ebp
call fcn.004b4401
add esp, 0xc
test eax, eax
je 0x4a711b
push esi
push esi
push esi
push esi
push esi
call fcn.0049cdbf
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.004b5016
add esp, 0xc
jmp 0x4a7163
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x4a7163
cmp ebp, 0xffffffff
je 0x4a7163
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x55e30c]
push dword [esi]
call fcn.0049c9c0
pop ecx
push eax
push dword [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x4b5016
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.004a727c
xor ebx, ebx
cmp dword [0x564138], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x4b50ec
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x4b51cc
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x4b51cc
push eax
call fcn.004a720e
mov dword [esp], 0x52d7b8
push edi
mov dword [0x564138], eax
call esi
push eax
call fcn.004a720e
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x56413c], eax
call esi
push eax
call fcn.004a720e
mov dword [0x564140], eax
lea eax, [ebp - 0xc]
push eax
call fcn.004a0ab5
test eax, eax
pop ecx
pop ecx
je 0x4b50ba
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0049cdbf
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x4b50ec
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.004a720e
cmp eax, ebx
pop ecx
mov dword [0x564148], eax
je 0x4b50ec
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.004a720e
pop ecx
mov dword [0x564144], eax
mov eax, dword [0x564144]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x4b5171
cmp dword [0x564148], ecx
je 0x4b5171
push eax
call fcn.004a7285
push dword [0x564148]
mov esi, eax
call fcn.004a7285
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x4b5171
cmp edi, ebx
je 0x4b5171
call esi
cmp eax, ebx
je 0x4b513e
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x4b513e
test byte [ebp - 0x18], 1
jne 0x4b5171
lea eax, [ebp - 0x10]
push eax
call fcn.004a0aec
test eax, eax
pop ecx
je 0x4b5159
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0049cdbf
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x4b5168
or dword [ebp + 0x10], 0x200000
jmp 0x4b51ac
or dword [ebp + 0x10], 0x40000
jmp 0x4b51ac
mov eax, dword [0x56413c]
cmp eax, dword [ebp - 8]
je 0x4b51ac
push eax
call fcn.004a7285
cmp eax, ebx
pop ecx
je 0x4b51ac
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x4b51ac
mov eax, dword [0x564140]
cmp eax, dword [ebp - 8]
je 0x4b51ac
push eax
call fcn.004a7285
cmp eax, ebx
pop ecx
je 0x4b51ac
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x564138]
call fcn.004a7285
cmp eax, ebx
pop ecx
je 0x4b51cc
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x4b51ce
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4bac76
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x98
mov eax, dword [0x55e2f8]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
mov esi, ecx
call fcn.004babb5
mov eax, 0x400000
push 0x94
mov dword [esi + 8], eax
mov dword [esi + 4], eax
lea eax, [ebp - 0x20]
push 0
push eax
mov dword [esi], 0x3c
mov byte [esi + 0xc], 0
call fcn.0049e730
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x20], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x10], 2
jne 0x4bacc5
cmp dword [ebp - 0x1c], 5
jb 0x4bacdd
jmp 0x4bacd9
cmp dword [ebp - 0x10], 1
jne 0x4bacdd
cmp dword [ebp - 0x1c], 4
ja 0x4bacd9
jne 0x4bacdd
cmp dword [ebp - 0x18], 0
jbe 0x4bacdd
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x52df98
call fcn.00473910
test eax, eax
jge 0x4bacfe
mov byte [0x5642b0], 1
mov ecx, dword [ebp + 0x74]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.004a4277
add ebp, 0x78
leave
ret

Function at 0x4baf7d
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
cmp dword [0x56422c], 0
push esi
jne 0x4baef0
call fcn.004bae1b
test eax, eax
je 0x4baf33
mov eax, dword [0x56422c]
cmp eax, 1
jne 0x4baf11
push 0xd
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x4baf33
pop esi
ret
push eax
call dword [0x564234]
test eax, eax
jne 0x4baf7b
push 0x40
mov eax, 0x1000
push eax
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
test esi, esi
jne 0x4baf37
xor eax, eax
pop esi
ret
mov eax, dword [esi]
push edi
push dword [0x56422c]
call dword [0x564234]
mov edi, eax
test edi, edi
je 0x4baf5e
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, edi
jmp 0x4baf7a
lea edi, [esi + 0xff0]
push esi
push dword [0x56422c]
call dword [0x564230]
add esi, 0x10
cmp esi, edi
jb 0x4baf64
mov eax, esi
pop edi
pop esi
ret
jmp 0x4baedd

Function at 0x4bb009
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x55e2f8]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x194]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x4bb04a
cmp byte [ebp - 0x194], 2
jne 0x4bb044
cmp byte [ebp - 0x193], 2
je 0x4bb04d
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 2
pop eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a4277
leave
ret

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

Disassembly:
push 0
push dword [esp + 0x10]
push dword [esp + 0x10]
push dword [esp + 0x10]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x4c2d2b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x2733
neg eax
sbb eax, eax
and eax, 0xffffffe7
add eax, 0x51
ret
mov ecx, dword [esp + 0x10]
mov dword [ecx], eax
xor eax, eax
ret
Function at 0x4c2e4c
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esi + 0x164]
test ecx, ecx
je 0x4c2e6c
push dword [esi + 0xf4]
push dword [esp + 0xc]
push dword [esp + 0xc]
push eax
push esi
call ecx
add esp, 0x14
ret
test eax, eax
jl 0x4c2ea5
cmp eax, 2
jg 0x4c2ea5
push dword [esi + 0xf0]
imul eax, eax, 3
push 1
add eax, 0x52ed80
push 2
push eax
call fcn.004a16d1
push dword [esi + 0xf0]
push 1
push dword [esp + 0x20]
push dword [esp + 0x20]
call fcn.004a16d1
add esp, 0x20
xor eax, eax
ret

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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + eax*4 + 0x12c]
push edi
push 0
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push eax
call dword [sym.imp.WS2_32.dll_send]
mov edi, dword [ebp + 0x18]
and dword [edi], 0
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
jne 0x4c30dd
push ebx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp ebx, 0x2733
jne 0x4c30b7
and dword [ebp + 8], 0
mov dword [edi], 0x51
jmp 0x4c30dc
push ebx
push esi
call fcn.004cc21c
push eax
push str.Send_failure:__s
push dword [esi]
call fcn.004c2fd7
mov eax, dword [esi]
mov dword [eax + 0x855c], ebx
add esp, 0x14
mov dword [edi], 0x37
pop ebx
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebp
ret
Function at 0x4c378c
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
lea ebp, [esp - 0x90]
sub esp, 0x110
mov eax, dword [0x55e2f8]
xor eax, ebp
mov dword [ebp + 0x8c], eax
push ebx
push esi
mov esi, dword [ebp + 0x98]
cmp dword [esi + 0x198], 0
mov ebx, dword [esi]
push edi
mov dword [ebp - 0x78], esi
mov dword [ebp - 0x80], ebx
jne 0x4c38a9
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp - 0x74]
push eax
push dword [ebp + 0x9c]
mov edi, 0x80
mov dword [ebp - 0x7c], edi
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x4c3809
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push esi
call fcn.004cc21c
push eax
push edi
push str.getpeername___failed_with_errno__d:__s
push ebx
call fcn.004c2fd7
add esp, 0x18
jmp 0x4c38b0
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 0x9c]
mov dword [ebp - 0x7c], edi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4c383c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push esi
call fcn.004cc21c
push eax
push edi
push str.getsockname___failed_with_errno__d:__s
jmp 0x4c37fb
lea edi, [esi + 0xc8]
lea ebx, [esi + 0x9a]
lea esi, [ebp - 0x74]
call fcn.004c3753
test eax, eax
jne 0x4c3871
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push dword [ebp - 0x78]
call fcn.004cc21c
push eax
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push dword [ebp - 0x80]
jmp 0x4c37fc
mov eax, dword [ebp - 0x78]
lea edi, [eax + 0xfc]
lea ebx, [eax + 0xcc]
lea esi, [ebp + 0xc]
call fcn.004c3753
test eax, eax
jne 0x4c38a6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push dword [ebp - 0x78]
call fcn.004cc21c
push eax
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
jmp 0x4c386c
mov esi, dword [ebp - 0x78]
push esi
call fcn.004c3704
pop ecx
mov ecx, dword [ebp + 0x8c]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004a4277
add ebp, 0x90
leave
ret

Function at 0x4c38c8
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [edi]
mov eax, dword [esi + 0x308]
push 4
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
push 1
push 6
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x4c390d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.004cc21c
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.004c2f64
add esp, 0x14
jmp 0x4c391a
push str.TCP_NODELAY_set_n
push esi
call fcn.004c2f64
pop ecx
pop ecx
pop esi
leave
ret
Function at 0x4c3d71
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x520]
cmp eax, 0xffffffff
push esi
je 0x4c3dc4
mov ecx, dword [ecx + 0x514]
mov ecx, dword [ecx]
lea eax, [ecx + eax*4]
cmp dword [eax], 0
je 0x4c3dc4
mov ecx, dword [ebp + 0xc]
test ecx, ecx
mov eax, dword [eax]
je 0x4c3d9e
mov dword [ecx], eax
cmp dword [eax + 0x144], 0
mov esi, dword [eax + 0x12c]
jne 0x4c3dc4
push 2
push 1
lea eax, [ebp + 0xb]
push eax
push esi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x4c3dc4
mov eax, esi
jmp 0x4c3dc7
or eax, 0xffffffff
pop esi
pop ebp
ret
Function at 0x4c4e99
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 0x14]
and dword [eax], 0
and dword [ebp - 4], 0
and dword [ebp - 0x14], 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
mov dword [ebp - 8], eax
jne 0x4c500b
push esi
mov esi, dword [ebp - 0x10]
test esi, esi
mov dword [ebp - 0xc], esi
je 0x4c4ff0
push ebx
push edi
jmp 0x4c4ee1
mov esi, dword [ebp - 0xc]
cmp dword [esi + 4], 2
jne 0x4c4f84
cmp dword [esi + 0x18], 0
je 0x4c4f84
mov eax, dword [esi + 0x10]
test eax, eax
jbe 0x4c4f84
push 0x10
pop edi
cmp eax, edi
jb 0x4c4f84
push 0x20
call dword [0x55f5ec]
mov ebx, eax
xor eax, eax
cmp ebx, eax
pop ecx
je 0x4c4f94
mov ecx, dword [esi]
mov dword [ebx], ecx
mov ecx, dword [esi + 4]
mov dword [ebx + 4], ecx
mov ecx, dword [esi + 8]
mov dword [ebx + 8], ecx
mov ecx, dword [esi + 0xc]
push edi
mov dword [ebx + 0xc], ecx
mov dword [ebx + 0x10], edi
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x14], eax
mov dword [ebx + 0x1c], eax
call dword [0x55f5ec]
test eax, eax
pop ecx
mov dword [ebx + 0x18], eax
je 0x4c4f9d
mov esi, dword [esi + 0x18]
mov edi, eax
mov eax, dword [ebp - 0xc]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov eax, dword [eax + 0x14]
test eax, eax
je 0x4c4f6b
push eax
call dword [0x55f5f8]
test eax, eax
pop ecx
mov dword [ebx + 0x14], eax
je 0x4c4fad
cmp dword [ebp - 4], 0
jne 0x4c4f74
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4c4f7e
mov dword [eax + 0x1c], ebx
mov esi, dword [ebp - 0xc]
mov dword [ebp - 0x14], ebx
mov esi, dword [esi + 0x1c]
test esi, esi
mov dword [ebp - 0xc], esi
jne 0x4c4ede
jmp 0x4c4fc6
mov dword [ebp - 8], 8
jmp 0x4c4fc6
push ebx
mov dword [ebp - 8], 8
call dword [0x55f5f0]
jmp 0x4c4fc5
push dword [ebx + 0x18]
mov dword [ebp - 8], 8
call dword [0x55f5f0]
push ebx
call dword [0x55f5f0]
pop ecx
pop ecx
xor esi, esi
cmp dword [ebp - 0x10], esi
pop edi
pop ebx
je 0x4c4fd8
push dword [ebp - 0x10]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
cmp dword [ebp - 8], esi
je 0x4c4feb
push dword [ebp - 4]
call fcn.004c4e5d
pop ecx
mov dword [ebp - 4], esi
jmp 0x4c4fff
cmp dword [ebp - 4], esi
jne 0x4c4fff
mov eax, 0x2af9
push eax
mov dword [ebp - 8], eax
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
mov eax, dword [ebp - 8]
pop esi
leave
ret
Function at 0x4c535d
Capabilities:
Create udp socket

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
push 0x48
push 1
mov ebx, eax
mov edi, ecx
call dword [0x55f5fc]
mov esi, eax
xor eax, eax
cmp esi, eax
pop ecx
pop ecx
mov dword [ebp - 4], 0xc
mov dword [edi + 0x3ac], esi
je 0x4c540f
mov dword [edi + 0x3a4], eax
mov dword [edi + 0x3a8], eax
mov dword [edi + 0x3a0], eax
mov dword [edi + 0x39c], ebx
or dword [esi + 4], 0xffffffff
push ebx
push dword [ebp + 8]
mov dword [esi], eax
lea eax, [esi + 0x10]
call fcn.004c5219
test eax, eax
pop ecx
pop ecx
je 0x4c540f
lea ebx, [edi + 0x398]
push dword [ebx]
call fcn.004bb6f7
push dword [ebp + 8]
call dword [0x55f5f8]
test eax, eax
pop ecx
pop ecx
mov dword [ebx], eax
je 0x4c540f
push 0
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi + 4], eax
je 0x4c540f
lea eax, [esi + 0x10]
push eax
push 0x4c528d
call fcn.004cca44
test eax, eax
pop ecx
pop ecx
mov dword [esi], eax
jne 0x4c5429
call fcn.004a686e
mov eax, dword [eax]
mov dword [ebp - 4], eax
add edi, 0x398
push edi
call fcn.004c530b
pop ecx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4c542c
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret