joyce8/EMBER2024-capa huggingface dataset:
Function at 0x491387
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
lea ebp, [esp - 0x1ac]
sub esp, 0x22c
mov eax, dword [0x5041ec]
xor eax, ebp
mov dword [ebp + 0x1a8], eax
push ebx
push esi
xor ebx, ebx
push 0x206
lea eax, [ebp - 0x5e]
push ebx
push eax
mov byte [ebp - 0x61], bl
mov dword [ebp - 0x6c], ebx
mov word [ebp - 0x60], bx
call fcn.004a6df0
mov esi, str.DiskVirtual_HD
push esi
mov dword [ebp - 0x70], 0x104
call fcn.004a56c9
add esp, 0x10
mov dword [ebp - 0x78], eax
lea eax, [ebp - 0x74]
push eax
push 0x20019
push ebx
push str.SYSTEMCurrentControlSetEnumIDE
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x74], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
jne 0x49146d
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x68], eax
lea eax, [ebp - 0x80]
push eax
push ebx
push ebx
push ebx
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x60]
push eax
push dword [ebp - 0x6c]
push dword [ebp - 0x68]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
inc dword [ebp - 0x6c]
test eax, eax
jne 0x49145f
cmp word [ebp - 0x60], bx
je 0x491440
mov eax, dword [ebp - 0x78]
cmp dword [ebp - 0x70], eax
jb 0x491440
push eax
lea eax, [ebp - 0x60]
push esi
push eax
call fcn.004ab31f
add esp, 0xc
test eax, eax
je 0x49145b
push 0x208
lea eax, [ebp - 0x60]
push ebx
push eax
call fcn.004a6df0
add esp, 0xc
mov dword [ebp - 0x70], 0x104
jmp 0x4913fe
mov byte [ebp - 0x61], 1
cmp dword [ebp - 0x68], ebx
je 0x49146d
push dword [ebp - 0x68]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp + 0x1a8]
mov al, byte [ebp - 0x61]
pop esi
xor ecx, ebp
pop ebx
call fcn.004ae9de
add ebp, 0x1ac
leave
ret

Function at 0x49155a
Capabilities:
Check if file exists
Get common file path

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x5041ec]
xor eax, ebp
mov dword [ebp + 0x39c], eax
push ebx
push esi
push edi
mov edi, 0x208
xor ebx, ebx
push edi
lea eax, [ebp + 0x192]
push ebx
push eax
mov word [ebp + 0x190], bx
call fcn.004a6df0
add esp, 0xc
mov esi, 0x104
push esi
lea eax, [ebp + 0x190]
push eax
mov byte [ebp - 0x7d], bl
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
jbe 0x491613
lea eax, [ebp + 0x190]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
and word [ebp - 0x7c], 0
push edi
lea eax, [ebp - 0x7a]
push 0
push eax
call fcn.004a6df0
push 0xffffffffffffffff
lea eax, [ebp + 0x190]
push eax
lea eax, [ebp - 0x7c]
push esi
push eax
call fcn.004aa589
push 0xffffffffffffffff
push dword [ebx + 0x50b674]
lea eax, [ebp - 0x7c]
push esi
push eax
call fcn.004ca5e6
add esp, 0x2c
lea eax, [ebp - 0x7c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x49160f
add ebx, 4
cmp ebx, 4
jb 0x4915be
jmp 0x491613
mov byte [ebp - 0x7d], 1
mov ecx, dword [ebp + 0x39c]
mov al, byte [ebp - 0x7d]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004ae9de
add ebp, 0x3a0
leave
ret
Function at 0x49162e
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
lea eax, [ebp - 8]
push eax
push 0x20019
xor ebx, ebx
push ebx
push dword [ebp + 8]
mov dword [ebp - 8], ebx
push reloc.OLEAUT32.dll_SysReAllocString
mov byte [ebp - 1], bl
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x49165e
mov byte [ebp - 1], bl
jmp 0x4916c1
push esi
push 0x80
call fcn.004a6bcc
pop ecx
mov esi, eax
lea eax, [ebp - 0xc]
push eax
push esi
lea eax, [ebp - 0x10]
push eax
push ebx
push dword [ebp + 0xc]
mov dword [ebp - 0x10], 1
push dword [ebp - 8]
mov dword [ebp - 0xc], 0x50
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x491699
mov byte [ebp - 1], bl
jmp 0x4916ac
push dword [ebp + 0x10]
push esi
call fcn.004a56df
test eax, eax
pop ecx
pop ecx
je 0x4916ac
mov byte [ebp - 1], 1
cmp esi, ebx
je 0x4916b7
push esi
call fcn.004a5e9d
pop ecx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
mov al, byte [ebp - 1]
pop ebx
leave
ret

Function at 0x491751
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
lea ebp, [esp - 0x1b0]
sub esp, 0x230
mov eax, dword [0x5041ec]
xor eax, ebp
mov dword [ebp + 0x1ac], eax
mov eax, dword [ebp + 0x1b8]
push edi
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp + 0x1bc]
xor edi, edi
push 0x206
mov dword [ebp - 0x78], eax
lea eax, [ebp - 0x5a]
push edi
push eax
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x68], edi
mov word [ebp - 0x5c], di
call fcn.004a6df0
add esp, 0xc
lea eax, [ebp - 0x70]
push eax
push 0x20019
push edi
push str.SYSTEMCurrentControlSetEnumPCI
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x60], 0x104
mov dword [ebp - 0x70], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, edi
jne 0x491874
mov eax, dword [ebp - 0x70]
push ebx
mov dword [ebp - 0x64], eax
push esi
lea eax, [ebp - 0x80]
push eax
push edi
push edi
push edi
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x5c]
push eax
push dword [ebp - 0x68]
push dword [ebp - 0x64]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
inc dword [ebp - 0x68]
test eax, eax
jne 0x491864
mov ebx, dword [ebp - 0x6c]
xor esi, esi
inc esi
add ebx, 0x48
cmp word [ebp - 0x5c], di
je 0x49182a
cmp word [ebx], di
je 0x49182a
push ebx
call fcn.004a56c9
cmp eax, 1
pop ecx
jb 0x49182a
cmp dword [ebp - 0x60], eax
jbe 0x49182a
push eax
lea eax, [ebp - 0x5c]
push ebx
push eax
call fcn.004ab31f
add esp, 0xc
test eax, eax
je 0x49184e
inc esi
add ebx, 0x40
cmp esi, 3
jb 0x4917fc
push 0x208
lea eax, [ebp - 0x5c]
push edi
push eax
call fcn.004a6df0
add esp, 0xc
mov dword [ebp - 0x60], 0x104
jmp 0x4917d1
mov eax, dword [ebp - 0x6c]
mov ecx, dword [ebp - 0x78]
shl esi, 6
mov eax, dword [esi + eax + 4]
mov dword [ecx], eax
mov dword [ebp - 0x74], 1
cmp dword [ebp - 0x64], edi
pop esi
pop ebx
je 0x491874
push dword [ebp - 0x64]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp + 0x1ac]
mov eax, dword [ebp - 0x74]
xor ecx, ebp
pop edi
call fcn.004ae9de
add ebp, 0x1b0
leave
ret 8
Function at 0x49188f
Capabilities:
Get common file path

Disassembly:
push ebp
lea ebp, [esp - 0x190]
sub esp, 0x210
mov eax, dword [0x5041ec]
xor eax, ebp
mov dword [ebp + 0x18c], eax
push esi
mov esi, ecx
mov ecx, dword [esi]
xor eax, eax
cmp dword [ecx - 0xc], eax
je 0x491a05
push ebx
push edi
push 0x208
push eax
mov word [ebp - 0x80], ax
lea eax, [ebp - 0x7e]
push eax
call fcn.004a6df0
add esp, 0xc
mov edi, str._ALLUSERSPROFILE_
push edi
xor ecx, ecx
call fcn.004032dd
or ebx, 0xffffffff
cmp eax, ebx
jne 0x4919d0
mov edi, str._APPDATA_
push edi
xor ecx, ecx
call fcn.004032dd
cmp eax, ebx
jne 0x4919d0
mov edi, str._TEMP_
push edi
xor ecx, ecx
call fcn.004032dd
cmp eax, ebx
jne 0x4919d0
mov edi, str._SYSTEM_
push edi
xor ecx, ecx
call fcn.004032dd
cmp eax, ebx
je 0x491958
push 0x104
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jbe 0x4919e4
lea eax, [ebp - 0x80]
push eax
push edi
push esi
call fcn.00479277
mov eax, esi
call fcn.00433962
mov edi, 0x4eb570
jmp 0x4919f4
mov edi, str._WINDOWS_
push edi
xor ecx, ecx
call fcn.004032dd
cmp eax, ebx
je 0x49197a
push 0x104
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
jmp 0x491934
mov edi, str._CUR_DIR_
push edi
xor ecx, ecx
call fcn.004032dd
cmp eax, ebx
je 0x4919bb
push 0x20a
lea eax, [ebp - 0x80]
push 0
push eax
call fcn.004a6df0
add esp, 0xc
push 0x105
lea eax, [ebp - 0x80]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
jmp 0x49193c
mov edi, 0x4ed4a4
push edi
xor ecx, ecx
call fcn.004032dd
cmp eax, ebx
je 0x491947
lea eax, [ebp - 0x80]
push eax
push edi
call fcn.00491a1b
test eax, eax
pop ecx
pop ecx
jne 0x49193c
xor eax, eax
jmp 0x491a03
push 0x4e1d18
push edi
push esi
call fcn.00479277
push edi
xor ecx, ecx
call fcn.004032dd
cmp eax, ebx
jne 0x4919e8
xor eax, eax
inc eax
pop edi
pop ebx
mov ecx, dword [ebp + 0x18c]
xor ecx, ebp
pop esi
call fcn.004ae9de
add ebp, 0x190
leave
ret
Function at 0x491a1b
Capabilities:
Query environment variable

Disassembly:
push 0x14
push 0x4f6e20
call fcn.004b1710
xor eax, eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
cmp dword [ebp + 8], eax
je 0x491acc
cmp dword [ebp + 0xc], eax
je 0x491acc
push eax
push eax
push dword [ebp + 8]
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
call edi
mov esi, eax
cmp esi, 1
jb 0x491acc
mov ebx, 0x103
cmp esi, ebx
ja 0x491acc
and dword [ebp - 4], 0
xor ecx, ecx
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00491d0c
pop ecx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x491ac5
lea ecx, [esi + esi]
push ecx
push 0
push eax
call fcn.004a6df0
add esp, 0xc
push esi
push dword [ebp - 0x24]
push dword [ebp + 8]
call edi
test eax, eax
je 0x491ac5
cmp eax, ebx
ja 0x491ac5
push eax
push dword [ebp - 0x24]
push ebx
push dword [ebp + 0xc]
call fcn.004aa589
add esp, 0x10
mov dword [ebp - 0x20], 1
jmp 0x491ac5
mov dword [ebp - 4], 0xfffffffe
cmp dword [ebp - 0x1c], 0
je 0x491adb
push dword [ebp - 0x1c]
call fcn.004a5be5
pop ecx
mov eax, dword [ebp - 0x20]
call fcn.004b1755
ret

Function at 0x491ae4
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov esi, eax
test esi, esi
je 0x491b88
push edi
push 1
push esi
call fcn.004a65fb
mov edi, eax
test edi, edi
pop ecx
pop ecx
je 0x491b85
push edi
push esi
push dword [ebp - 8]
push dword [ebp + 8]
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
je 0x491b7e
and dword [ebp - 4], 0
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
push 0x4e9140
push edi
call sub.VERSION.dll_VerQueryValueW
test eax, eax
je 0x491b7e
cmp dword [ebp - 4], 0
je 0x491b7e
push 0x10
call fcn.0046133b
mov esi, eax
test esi, esi
pop ecx
je 0x491b85
mov eax, dword [ebp - 4]
movzx ecx, word [eax + 2]
movzx eax, word [eax]
mov dword [esi + 8], ecx
lea ecx, [ebp - 0x10]
push ecx
mov dword [esi + 4], eax
lea eax, [esi + 0xc]
and dword [eax], 0
push eax
push 0x4e1d18
push edi
mov dword [esi], edi
call sub.VERSION.dll_VerQueryValueW
mov eax, esi
jmp 0x491b87
push edi
call fcn.004a5e9d
pop ecx
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x491ba2
Capabilities:
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x5041ec]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x224], eax
mov ax, word [edi + 4]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
mov word [ebp - 0x14], ax
mov ax, word [edi + 8]
push esi
mov word [ebp - 0x12], ax
call ebx
mov word [ebp - 0x10], ax
mov ax, word [edi + 8]
mov word [ebp - 0xe], ax
mov ax, word [edi + 4]
mov word [ebp - 0xc], ax
mov word [ebp - 0xa], 0x4e4
call ebx
mov word [ebp - 8], ax
mov word [ebp - 6], 0x4e4
xor ebx, ebx
mov esi, 0x104
movzx eax, word [ebp + ebx*2 - 0x14]
movzx ecx, word [ebp + ebx*2 - 0x12]
inc ebx
push 0x4e9258
movzx ecx, cx
push ecx
movzx eax, ax
push eax
push str.StringFileInfo_04x_04x_ls
push esi
lea eax, [ebp - 0x21c]
push esi
push eax
inc ebx
call fcn.004a6d95
and dword [ebp - 0x220], 0
add esp, 0x1c
lea eax, [ebp - 0x228]
push eax
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x21c]
push eax
push dword [edi]
call sub.VERSION.dll_VerQueryValueW
test eax, eax
je 0x491c64
cmp dword [ebp - 0x220], 0
jne 0x491c7b
cmp ebx, 8
jb 0x491c05
xor al, al
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.004ae9de
leave
ret 4
mov esi, dword [ebp - 0x220]
push esi
call fcn.004a56c9
pop ecx
mov ecx, esi
mov esi, dword [ebp - 0x224]
call fcn.0041f7c3
mov al, 1
jmp 0x491c6b

Function at 0x492805
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x98
mov eax, dword [0x5041ec]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
mov esi, ecx
call fcn.00492744
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.004a6df0
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 0x492854
cmp dword [ebp - 0x1c], 5
jb 0x49286c
jmp 0x492868
cmp dword [ebp - 0x10], 1
jne 0x49286c
cmp dword [ebp - 0x1c], 4
ja 0x492868
jne 0x49286c
cmp dword [ebp - 0x18], 0
jbe 0x49286c
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x4d2a88
call fcn.0043f723
test eax, eax
jge 0x49288d
mov byte [0x50c808], 1
mov ecx, dword [ebp + 0x74]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.004ae9de
add ebp, 0x78
leave
ret
Function at 0x492cd5
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
cmp dword [0x50bae8], 0
push esi
jne 0x492c48
call fcn.00492b73
test eax, eax
je 0x492c8b
mov eax, dword [0x50bae8]
cmp eax, 1
jne 0x492c69
push 0xd
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x492c8b
pop esi
ret
push eax
call dword [0x50baf0]
test eax, eax
jne 0x492cd3
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 0x492c8f
xor eax, eax
pop esi
ret
mov eax, dword [esi]
push edi
push dword [0x50bae8]
call dword [0x50baf0]
mov edi, eax
test edi, edi
je 0x492cb6
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, edi
jmp 0x492cd2
lea edi, [esi + 0xff0]
push esi
push dword [0x50bae8]
call dword [0x50baec]
add esi, 0x10
cmp esi, edi
jb 0x492cbc
mov eax, esi
pop edi
pop esi
ret
jmp 0x492c35

Function at 0x492f60
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x5041ec]
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 0x492fa1
cmp byte [ebp - 0x194], 2
jne 0x492f9b
cmp byte [ebp - 0x193], 2
je 0x492fa4
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 2
pop eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ae9de
leave
ret

Function at 0x49ac53
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 0x49ac82
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 0x49ada3
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esi + 0x164]
test ecx, ecx
je 0x49adc3
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 0x49adfc
cmp eax, 2
jg 0x49adfc
push dword [esi + 0xf0]
imul eax, eax, 3
push 1
add eax, 0x4d3888
push 2
push eax
call fcn.004ac01e
push dword [esi + 0xf0]
push 1
push dword [esp + 0x20]
push dword [esp + 0x20]
call fcn.004ac01e
add esp, 0x20
xor eax, eax
ret
Function at 0x49afc2
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 0x49b034
push ebx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp ebx, 0x2733
jne 0x49b00e
and dword [ebp + 8], 0
mov dword [edi], 0x51
jmp 0x49b033
push ebx
push esi
call fcn.004a4173
push eax
push str.Send_failure:__s
push dword [esi]
call fcn.0049af2e
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 0x49b6e3
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
lea ebp, [esp - 0x90]
sub esp, 0x110
mov eax, dword [0x5041ec]
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 0x49b800
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 0x49b760
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push esi
call fcn.004a4173
push eax
push edi
push str.getpeername___failed_with_errno__d:__s
push ebx
call fcn.0049af2e
add esp, 0x18
jmp 0x49b807
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 0x49b793
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push esi
call fcn.004a4173
push eax
push edi
push str.getsockname___failed_with_errno__d:__s
jmp 0x49b752
lea edi, [esi + 0xc8]
lea ebx, [esi + 0x9a]
lea esi, [ebp - 0x74]
call fcn.0049b6aa
test eax, eax
jne 0x49b7c8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push dword [ebp - 0x78]
call fcn.004a4173
push eax
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push dword [ebp - 0x80]
jmp 0x49b753
mov eax, dword [ebp - 0x78]
lea edi, [eax + 0xfc]
lea ebx, [eax + 0xcc]
lea esi, [ebp + 0xc]
call fcn.0049b6aa
test eax, eax
jne 0x49b7fd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push dword [ebp - 0x78]
call fcn.004a4173
push eax
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
jmp 0x49b7c3
mov esi, dword [ebp - 0x78]
push esi
call fcn.0049b65b
pop ecx
mov ecx, dword [ebp + 0x8c]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004ae9de
add ebp, 0x90
leave
ret

Function at 0x49b81f
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 0x49b864
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.004a4173
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.0049aebb
add esp, 0x14
jmp 0x49b871
push str.TCP_NODELAY_set_n
push esi
call fcn.0049aebb
pop ecx
pop ecx
pop esi
leave
ret
Function at 0x49bcc8
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 0x49bd1b
mov ecx, dword [ecx + 0x514]
mov ecx, dword [ecx]
lea eax, [ecx + eax*4]
cmp dword [eax], 0
je 0x49bd1b
mov ecx, dword [ebp + 0xc]
test ecx, ecx
mov eax, dword [eax]
je 0x49bcf5
mov dword [ecx], eax
cmp dword [eax + 0x144], 0
mov esi, dword [eax + 0x12c]
jne 0x49bd1b
push 2
push 1
lea eax, [ebp + 0xb]
push eax
push esi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x49bd1b
mov eax, esi
jmp 0x49bd1e
or eax, 0xffffffff
pop esi
pop ebp
ret
Function at 0x49cdf0
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 0x49cf62
push esi
mov esi, dword [ebp - 0x10]
test esi, esi
mov dword [ebp - 0xc], esi
je 0x49cf47
push ebx
push edi
jmp 0x49ce38
mov esi, dword [ebp - 0xc]
cmp dword [esi + 4], 2
jne 0x49cedb
cmp dword [esi + 0x18], 0
je 0x49cedb
mov eax, dword [esi + 0x10]
test eax, eax
jbe 0x49cedb
push 0x10
pop edi
cmp eax, edi
jb 0x49cedb
push 0x20
call dword [0x5040b8]
mov ebx, eax
xor eax, eax
cmp ebx, eax
pop ecx
je 0x49ceeb
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 [0x5040b8]
test eax, eax
pop ecx
mov dword [ebx + 0x18], eax
je 0x49cef4
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 0x49cec2
push eax
call dword [0x5040c4]
test eax, eax
pop ecx
mov dword [ebx + 0x14], eax
je 0x49cf04
cmp dword [ebp - 4], 0
jne 0x49cecb
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x49ced5
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 0x49ce35
jmp 0x49cf1d
mov dword [ebp - 8], 8
jmp 0x49cf1d
push ebx
mov dword [ebp - 8], 8
call dword [0x5040bc]
jmp 0x49cf1c
push dword [ebx + 0x18]
mov dword [ebp - 8], 8
call dword [0x5040bc]
push ebx
call dword [0x5040bc]
pop ecx
pop ecx
xor esi, esi
cmp dword [ebp - 0x10], esi
pop edi
pop ebx
je 0x49cf2f
push dword [ebp - 0x10]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
cmp dword [ebp - 8], esi
je 0x49cf42
push dword [ebp - 4]
call fcn.0049cdb4
pop ecx
mov dword [ebp - 4], esi
jmp 0x49cf56
cmp dword [ebp - 4], esi
jne 0x49cf56
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 0x49d2b4
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 [0x5040c8]
mov esi, eax
xor eax, eax
cmp esi, eax
pop ecx
pop ecx
mov dword [ebp - 4], 0xc
mov dword [edi + 0x3ac], esi
je 0x49d366
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.0049d170
test eax, eax
pop ecx
pop ecx
je 0x49d366
lea ebx, [edi + 0x398]
push dword [ebx]
call fcn.0049364e
push dword [ebp + 8]
call dword [0x5040c4]
test eax, eax
pop ecx
pop ecx
mov dword [ebx], eax
je 0x49d366
push 0
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi + 4], eax
je 0x49d366
lea eax, [esi + 0x10]
push eax
push 0x49d1e4
call fcn.004a4998
test eax, eax
pop ecx
pop ecx
mov dword [esi], eax
jne 0x49d380
call fcn.004b0679
mov eax, dword [eax]
mov dword [ebp - 4], eax
add edi, 0x398
push edi
call fcn.0049d262
pop ecx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x49d383
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret