joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4fcce0
Capabilities:
Get hostname

Disassembly:
sub esp, 0x150
mov eax, dword [0x6687b8]
xor eax, esp
mov dword [esp + 0x148], eax
xor eax, eax
push ebp
push esi
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
push edi
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov eax, 2
push 0x104
xor ebp, ebp
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
lea eax, [esp + 0x4d]
push ebp
push eax
mov dword [esp + 0x1c], 0
mov dword [esp + 0x24], 1
mov dword [esp + 0x30], 0x11
mov byte [esp + 0x54], 0
call fcn.005da970
add esp, 0xc
push 0x104
lea ecx, [esp + 0x4c]
push ecx
call dword [sym.imp.WS2_32.dll_gethostname]
test eax, eax
jne 0x4fcda0
mov eax, dword [0x68075c]
test eax, eax
jne 0x4fcd80
push eax
call fcn.004e8d70
mov dword [0x68075c], eax
lea edx, [esp + 0x10]
push edx
lea ecx, [esp + 0x1c]
push ecx
push 0
lea edx, [esp + 0x54]
push edx
call eax
mov esi, eax
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
test esi, esi
jne 0x4fce06
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4fce06
mov edi, dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [esp + 0x14], eax
mov eax, dword [eax + 0x18]
mov ecx, dword [eax]
mov edx, dword [eax + 8]
mov esi, dword [eax + 4]
mov eax, dword [eax + 0xc]
push str.127.0.0.1
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x44], edx
mov dword [esp + 0x48], eax
call edi
cmp esi, eax
jne 0x4fcde8
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 0x1c]
test eax, eax
mov dword [esp + 0x10], eax
jne 0x4fcdb2
jmp 0x4fcdea
mov ebp, esi
mov eax, dword [0x680760]
test eax, eax
jne 0x4fcdff
push 2
call fcn.004e8d70
mov dword [0x680760], eax
mov edx, dword [esp + 0x14]
push edx
call eax
mov ecx, dword [esp + 0x154]
pop edi
pop esi
mov eax, ebp
pop ebp
xor ecx, esp
call fcn.005d28b3
add esp, 0x150
ret
Function at 0x4fd1d0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x5fc591
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov eax, dword [0x6687b8]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
mov ebx, ecx
xor esi, esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x14], esi
mov eax, dword [0x677600]
mov edx, dword [eax + 0xc]
mov ecx, 0x677600
call edx
mov edi, dword [esp + 0x30]
add eax, 0x10
mov dword [edi], eax
cmp ebx, esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x14], 1
je 0x4fd315
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x4fd234
sub eax, edx
sar eax, 1
cmp eax, esi
jle 0x4fd315
push esi
push esi
push esi
push esi
push 0xffffffffffffffff
push ebx
push esi
push 0x3a8
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
lea ebp, [edi + 1]
push ebp
call fcn.005d1ef5
push ebp
mov esi, eax
push 0
push esi
call fcn.005da970
add esp, 0x10
lea eax, [esp + 0x18]
push eax
push 0
push edi
push esi
push 0xffffffffffffffff
push ebx
push 0
push 0x3a8
mov dword [esp + 0x38], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test esi, esi
je 0x4fd2fd
lea ecx, [esp + 0x1c]
push ecx
mov ecx, esi
call fcn.0049b410
mov dword [esp + 0x28], 1
mov ebx, dword [esp + 0x30]
call fcn.00478b90
mov byte [esp + 0x28], 0
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4fd2de
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push esi
call fcn.005d28c2
add esp, 4
mov eax, ebx
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov eax, edi
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
Function at 0x4fd450
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x5fc53d
mov eax, dword fs:[0]
push eax
sub esp, 0x21c
mov eax, dword [0x6687b8]
xor eax, esp
mov dword [esp + 0x218], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x6687b8]
xor eax, esp
push eax
lea eax, [esp + 0x230]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x240]
xor ebx, ebx
mov dword [esp + 0x238], ebx
mov dword [esp + 0x18], ebx
mov eax, dword [0x677600]
mov edx, dword [eax + 0xc]
mov ecx, 0x677600
mov dword [esp + 0x1c], ebp
call edx
add eax, 0x10
mov dword [ebp], eax
push 0x20a
lea eax, [esp + 0x24]
push ebx
mov dword [esp + 0x240], ebx
push eax
mov dword [esp + 0x24], 1
call fcn.005da970
push str.SOFTWARETencentQQPinyin
lea esi, [esp + 0x30]
mov edi, str.InstallPackName
call fcn.00479730
add esp, 0x10
test eax, eax
je 0x4fd56a
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4fd4f6
sub eax, edx
sar eax, 1
lea ecx, [esp + 0x20]
mov ebx, eax
push ecx
mov eax, ebp
call fcn.004037a0
mov edx, dword [ebp]
mov eax, dword [edx - 0xc]
cmp eax, 0x104
jle 0x4fd56a
mov eax, 0x104
lea ecx, [esp + 0x14]
mov edx, ebp
call fcn.0041a270
mov edi, ebp
mov dword [esp + 0x238], 1
call fcn.0040ab90
mov byte [esp + 0x238], 0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4fd56a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, ebp
mov ecx, dword [esp + 0x230]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x218]
xor ecx, esp
call fcn.005d28b3
add esp, 0x228
ret
Function at 0x4fdc60
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x60045e
mov eax, dword fs:[0]
push eax
push esi
push edi
mov eax, dword [0x6687b8]
xor eax, esp
push eax
lea eax, [esp + 0xc]
mov dword fs:[0], eax
mov esi, dword [esp + 0x1c]
xor edi, edi
mov dword [esi], edi
mov dword [esi + 4], edi
mov dword [esi + 8], edi
mov dword [esi + 0xc], edi
mov dword [esi + 0x10], edi
mov dword [esi + 0x14], edi
mov dword [esi + 0x18], edi
mov dword [esi + 0x1c], edi
mov dword [esi + 0x20], edi
mov dword [esi + 0x24], edi
mov dword [esi + 0x28], edi
mov dword [esi + 0x2c], edi
mov dword [esp + 0x14], edi
mov dword [esi + 0x30], edi
mov dword [esi + 0x34], edi
mov dword [esi + 0x38], edi
mov dword [esi + 0x3c], edi
mov byte [esp + 0x14], 1
mov eax, dword [0x677600]
mov edx, dword [eax + 0xc]
mov ecx, 0x677600
call edx
add eax, 0x10
mov dword [esi + 0x40], eax
mov byte [esp + 0x14], 2
mov dword [esi + 0x48], edi
mov dword [esi + 0x4c], edi
mov dword [esi + 0x50], edi
mov eax, dword [0x677600]
mov edx, dword [eax + 0xc]
mov ecx, 0x677600
call edx
add eax, 0x10
mov dword [esi + 0x54], eax
mov eax, dword [0x677600]
mov edx, dword [eax + 0xc]
mov ecx, 0x677600
call edx
add eax, 0x10
mov dword [esi + 0x58], eax
mov dword [esi + 0x6c], edi
mov ecx, dword [esi + 0x30]
cmp ecx, edi
je 0x4fdd2e
mov eax, dword [esi + 0x34]
call fcn.004ff9e0
mov eax, dword [esi + 0x30]
push eax
call fcn.005d27e0
add esp, 4
mov dword [esi + 0x30], edi
mov dword [esi + 0x34], edi
mov dword [esi + 0x38], edi
mov dword [esi + 0x64], edi
mov dword [esi + 0x68], edi
mov dword [esi + 0x70], edi
mov dword [esi + 0x5c], edi
mov dword [esi + 0x60], edi
mov eax, esi
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
add esp, 0xc
ret 4

Function at 0x4fdec0
Capabilities:
Create thread

Disassembly:
sub esp, 0xc
push ebx
push ebp
lea ebx, [esi + 0x44]
push edi
mov edi, dword [ebx + 8]
cmp dword [ebx + 4], edi
jbe 0x4fded6
call fcn.005d29f1
mov ebp, dword [ebx + 4]
cmp ebp, dword [ebx + 8]
jbe 0x4fdee3
call fcn.005d29f1
push edi
push ebx
push ebp
push ebx
lea eax, [esp + 0x20]
push eax
call fcn.0043c950
mov eax, dword [esp + 0x1c]
lea edi, [esi + 0x40]
call fcn.0040ab90
mov eax, dword [esp + 0x20]
lea edi, [esi + 0x54]
call fcn.0040ab90
mov eax, dword [esp + 0x24]
lea edi, [esi + 0x58]
call fcn.0040ab90
lea ecx, [esp + 0x1c]
push ecx
push 0
push esi
push 0x4fdf80
push 0
push 0
mov dword [esi + 0x70], 0x80004005
mov dword [esp + 0x34], 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
mov dword [esi + 0x6c], eax
jne 0x4fdf6d
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
test eax, eax
jg 0x4fdf5e
call edi
mov dword [esi + 0x70], eax
xor eax, eax
pop edi
pop ebp
pop ebx
add esp, 0xc
ret 0xc
call edi
and eax, 0xffff
or eax, 0x80070000
mov dword [esi + 0x70], eax
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret 0xc
Function at 0x4fffb0
Capabilities:
Check if file exists

Disassembly:
push ecx
lea eax, [esp]
push esi
push eax
call fcn.00500170
mov eax, dword [eax]
add esp, 4
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov esi, eax
mov eax, dword [esp + 4]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4fffe9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
pop esi
pop ecx
ret

Function at 0x4ffff0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x214
mov eax, dword [0x6687b8]
xor eax, esp
mov dword [esp + 0x210], eax
push ebx
mov ebx, 1
test byte [0x680a08], bl
mov dword [esp + 4], 0
jne 0x500044
mov eax, dword [0x677600]
mov edx, dword [eax + 0xc]
or dword [0x680a08], ebx
mov ecx, 0x677600
call edx
add eax, 0x10
push 0x613b20
mov dword [0x680a04], eax
call fcn.005d268a
add esp, 4
mov eax, dword [0x680a04]
cmp dword [eax - 0xc], 0
jne 0x5000a1
push 0x20a
lea ecx, [esp + 0xe]
push 0
push ecx
mov word [esp + 0x14], 0
call fcn.005da970
add esp, 0xc
push ebx
push 0x24
lea edx, [esp + 0x10]
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [esp + 8]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x500081
sub eax, edx
sar eax, 1
lea ecx, [esp + 8]
mov ebx, eax
push ecx
mov eax, 0x680a04
call fcn.004037a0
mov eax, dword [0x680a04]
add eax, 0xfffffff0
call fcn.0040a210
mov ecx, dword [esp + 0x214]
add eax, 0x10
pop ebx
mov dword [esi], eax
xor ecx, esp
mov eax, esi
call fcn.005d28b3
add esp, 0x214
ret
Function at 0x502050
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push 0xffffffffffffffff
push 0x5f8e73
mov eax, dword fs:[0]
push eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x6687b8]
xor eax, esp
push eax
lea eax, [esp + 0x14]
mov dword fs:[0], eax
mov edi, dword [esp + 0x24]
mov dword [edi], vtable.CAsyncTcpClient.0
mov eax, dword [0x677600]
mov edx, dword [eax + 0xc]
mov ecx, 0x677600
call edx
add eax, 0x10
mov dword [edi + 4], eax
xor ebx, ebx
mov dword [esp + 0x1c], ebx
mov eax, dword [0x677600]
mov edx, dword [eax + 0xc]
mov ecx, 0x677600
call edx
add eax, 0x10
mov dword [edi + 8], eax
mov byte [esp + 0x1c], 1
mov eax, dword [0x677600]
mov edx, dword [eax + 0xc]
mov ecx, 0x677600
call edx
add eax, 0x10
mov dword [edi + 0xc], eax
mov dword [edi + 0x18], ebx
mov dword [edi + 0x20], ebx
mov eax, 0x80
mov dword [edi + 0x28], ebx
mov dword [edi + 0x2c], ebx
mov dword [edi + 0x30], ebx
mov dword [edi + 0x34], ebx
mov dword [edi + 0x38], eax
mov dword [edi + 0x40], ebx
mov dword [edi + 0x44], ebx
mov dword [edi + 0x48], ebx
mov dword [edi + 0x4c], ebx
mov dword [edi + 0x50], eax
mov byte [esp + 0x1c], 6
mov dword [edi + 0x68], ebx
mov eax, dword [0x677600]
mov edx, dword [eax + 0xc]
mov ecx, 0x677600
lea ebp, [edi + 0x78]
call edx
add eax, 0x10
mov dword [ebp], eax
mov dword [edi + 0x80], ebx
mov byte [esp + 0x1c], 8
mov eax, dword [0x677600]
mov edx, dword [eax + 0xc]
mov ecx, 0x677600
lea esi, [edi + 0x88]
call edx
add eax, 0x10
mov dword [esi], eax
push 0x636aa8
push str.Enter__s
mov byte [esp + 0x24], 9
call fcn.00501f90
add esp, 8
mov dword [edi + 0x10], ebx
mov dword [edi + 0x14], ebx
mov dword [edi + 0x1c], ebx
call fcn.00415d80
mov esi, ebp
mov dword [edi + 0x8c], ebx
call fcn.00415d80
xor eax, eax
mov dword [edi + 0x7c], ebx
mov dword [edi + 0x54], eax
mov dword [edi + 0x5c], eax
mov dword [edi + 0x60], eax
or eax, 0xffffffff
push edi
mov dword [edi + 0x58], eax
mov word [edi + 0x54], 2
mov dword [edi + 0x64], ebx
mov dword [edi + 0x6c], eax
mov dword [edi + 0x70], 0x1399
mov byte [edi + 0x74], bl
mov byte [edi + 0x75], bl
mov byte [edi + 0x76], 1
mov byte [edi + 0x77], bl
mov dword [edi + 0x90], 1
mov dword [edi + 0x94], ebx
mov eax, dword [0x679078]
push eax
push 0xd6
push 0x636aa8
push str._s__d_RetrysCount___d_this___d__n
call fcn.00501f90
mov ecx, dword [esp + 0x3c]
add esp, 0x14
mov dword [edi + 0x9c], ecx
mov eax, edi
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 8
Function at 0x5023e0
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x198
mov eax, dword [0x6687b8]
xor eax, esp
mov dword [esp + 0x194], eax
push str.CAsyncTcpClient::Initialize
push str.Enter__s
call fcn.00501f90
add esp, 8
cmp byte [esi + 0x74], 0
jne 0x502448
lea eax, [esp]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x502444
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
jne 0x50244a
or eax, 0xffffffff
mov ecx, dword [esp + 0x194]
xor ecx, esp
call fcn.005d28b3
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x74], 1
xor eax, eax
mov ecx, dword [esp + 0x194]
xor ecx, esp
call fcn.005d28b3
mov esp, ebp
pop ebp
ret

Function at 0x502640
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x600378
mov eax, dword fs:[0]
push eax
push esi
push edi
mov eax, dword [0x6687b8]
xor eax, esp
push eax
lea eax, [esp + 0xc]
mov dword fs:[0], eax
push str.CAsyncTcpClient::SetHost
push str.Enter__s
mov dword [esp + 0x1c], 0
call fcn.00501f90
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
mov edi, dword [esp + 0x28]
add esp, 8
push eax
push ecx
push ecx
mov edx, esp
mov dword [esp + 0x34], esp
push edx
mov ecx, edi
call fcn.00426330
mov esi, dword [esp + 0x28]
call fcn.005026e0
mov esi, eax
lea eax, [edi - 0x10]
mov dword [esp + 0x14], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5026c8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
add esp, 0xc
ret 0x10

Function at 0x502960
Capabilities:
Connect socket

Disassembly:
push str.CAsyncTcpClient::ConnectDirect
push str.Enter__s_SOCKADDR_IN
call fcn.00501f90
mov eax, dword [esi + 0x68]
mov ecx, dword [esi + 0x6c]
add esp, 8
push 0x10
push 0x81da
push eax
push ecx
call dword [sym.imp.WS2_32.dll_WSAAsyncSelect]
cmp eax, 0xffffffff
jne 0x50299c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
jne 0x5029e1
or eax, 0xffffffff
ret 4
mov edx, dword [esp + 4]
mov eax, dword [esi + 0x6c]
push edi
push 0x10
push edx
push eax
call dword [sym.imp.WS2_32.dll_connect]
mov edi, eax
test edi, edi
jne 0x5029cf
mov ecx, dword [esi + 0x6c]
mov edx, dword [esi + 0x68]
push 0x10
push ecx
push 0x81da
push edx
call dword [sym.imp.USER32.dll_PostMessageW]
mov eax, edi
pop edi
ret 4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x5029de
xor edi, edi
mov eax, edi
pop edi
ret 4
Function at 0x504870
Capabilities:
Hide graphical window

Disassembly:
push ecx
push ebx
mov ebx, dword [sym.imp.USER32.dll_IsWindow]
push esi
push edi
mov edi, ecx
mov eax, dword [edi + 0x68]
push eax
call ebx
test eax, eax
jne 0x5048f8
mov esi, dword [esp + 0x14]
test esi, esi
je 0x5048ab
push esi
call ebx
test eax, eax
je 0x5048ab
mov eax, esi
mov dword [edi + 0x68], 0
push eax
mov dword [edi + 0x68], esi
call ebx
pop edi
pop esi
pop ebx
pop ecx
ret 4
push ecx
mov eax, esp
mov dword [eax], 0
push ecx
mov eax, esp
lea esi, [edi + 0x108]
mov dword [eax], 0
call fcn.00504f90
test eax, eax
je 0x5048f8
mov ecx, dword [edi + 0x10c]
push ecx
call ebx
test eax, eax
je 0x5048f8
mov edx, dword [edi + 0x10c]
push 0
push edx
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [edi + 0x10c]
mov dword [edi + 0x68], 0
mov dword [edi + 0x68], eax
mov eax, dword [edi + 0x68]
push eax
call ebx
pop edi
pop esi
pop ebx
pop ecx
ret 4
Function at 0x505b70
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x824
mov eax, dword [0x6687b8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov ebx, ecx
mov edi, edx
mov dword [ebp - 0x814], ebx
mov dword [ebp - 0x820], edi
call dword [0x668114]
lea esi, [edi + 0x202]
test esi, esi
mov dword [ebp - 0x81c], eax
jne 0x505bb4
mov dword [ebp - 0x818], esi
jmp 0x505c12
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
cmp eax, 0x3fffffff
jg 0x505c04
lea ebx, [eax + eax]
mov eax, ebx
call fcn.005e0460
mov edi, esp
test edi, edi
je 0x505bfe
mov eax, dword [ebp - 0x81c]
push 0
push 0
push ebx
push edi
push 0xffffffffffffffff
push esi
push 0
push eax
mov byte [edi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebx, dword [ebp - 0x814]
neg eax
sbb eax, eax
and eax, edi
jmp 0x505c06
mov ebx, dword [ebp - 0x814]
xor eax, eax
mov edi, dword [ebp - 0x820]
mov dword [ebp - 0x818], eax
add edi, 0x102
je 0x505c6a
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
cmp eax, 0x3fffffff
jg 0x505c6a
lea ebx, [eax + eax]
mov eax, ebx
call fcn.005e0460
mov esi, esp
test esi, esi
je 0x505c64
mov ecx, dword [ebp - 0x81c]
push 0
push 0
push ebx
push esi
push 0xffffffffffffffff
push edi
push 0
push ecx
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebx, dword [ebp - 0x814]
neg eax
sbb eax, eax
and eax, esi
jmp 0x505c6c
mov ebx, dword [ebp - 0x814]
xor eax, eax
mov edx, dword [ebp - 0x818]
push edx
mov edi, eax
lea esi, [ebp - 0x810]
call fcn.00505860
mov eax, dword [ebp - 0x410]
mov edx, dword [ebx]
push 0
push eax
mov ecx, esi
push ecx
push edx
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jle 0x505d17
push 0x3ff
lea eax, [ebp - 0x407]
push 0
push eax
mov byte [ebp - 0x408], 0
call fcn.005da970
mov edx, dword [ebx]
add esp, 0xc
push 0
push 0x400
lea ecx, [ebp - 0x408]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 2
jge 0x505cf1
mov esi, dword [ebx]
test esi, esi
mov edi, 0xffffffa2
je 0x505ced
push 1
push esi
call dword [sym.imp.WS2_32.dll_shutdown]
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, edi
jmp 0x505d32
xor eax, eax
cmp byte [ebp - 0x407], al
sete al
test eax, eax
je 0x505d10
mov eax, dword [ebp - 0x820]
push eax
mov ecx, ebx
call fcn.00505920
jmp 0x505d38
mov eax, 0xffffffa5
jmp 0x505d38
mov esi, dword [ebx]
test esi, esi
je 0x505d2d
push 1
push esi
call dword [sym.imp.WS2_32.dll_shutdown]
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0xffffffa1
mov dword [ebx], 0xffffffff
lea esp, [ebp - 0x830]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005d28b3
mov esp, ebp
pop ebp
ret
Function at 0x505d50
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
sub esp, 0x414
mov eax, dword [0x6687b8]
xor eax, esp
mov dword [esp + 0x40c], eax
push ebp
push edi
push 0
push 4
lea eax, [esp + 0x14]
mov edi, ecx
mov ecx, dword [esi]
push eax
push ecx
mov byte [esp + 0x1c], 5
mov byte [esp + 0x1d], 2
mov byte [esp + 0x1e], 0
mov byte [esp + 0x1f], 2
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jle 0x505e53
push 0x3ff
lea edx, [esp + 0x15]
push 0
push edx
mov byte [esp + 0x1c], 0
call fcn.005da970
mov ecx, dword [esi]
add esp, 0xc
push 0
push 0x400
lea eax, [esp + 0x18]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 2
jge 0x505deb
mov edi, dword [esi]
test edi, edi
mov ebp, 0xffffffa2
je 0x505de4
push 1
push edi
call dword [sym.imp.WS2_32.dll_shutdown]
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, ebp
jmp 0x505e6e
mov al, byte [esp + 0x11]
test al, al
je 0x505e17
cmp al, 2
jne 0x505e36
mov edx, edi
mov ecx, esi
call fcn.00505b70
pop edi
pop ebp
mov ecx, dword [esp + 0x40c]
xor ecx, esp
call fcn.005d28b3
add esp, 0x414
ret
push edi
mov ecx, esi
call fcn.00505920
pop edi
pop ebp
mov ecx, dword [esp + 0x40c]
xor ecx, esp
call fcn.005d28b3
add esp, 0x414
ret
mov edi, dword [esi]
test edi, edi
je 0x505e4c
push 1
push edi
call dword [sym.imp.WS2_32.dll_shutdown]
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0xffffffa3
jmp 0x505e6e
mov edi, dword [esi]
test edi, edi
je 0x505e69
push 1
push edi
call dword [sym.imp.WS2_32.dll_shutdown]
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0xffffffa1
mov ecx, dword [esp + 0x414]
pop edi
pop ebp
xor ecx, esp
mov dword [esi], 0xffffffff
call fcn.005d28b3
add esp, 0x414
ret
Function at 0x505e90
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket

Disassembly:
sub esp, 0x1c
mov eax, dword [0x6687b8]
xor eax, esp
mov dword [esp + 0x18], eax
push ebp
mov ebp, dword [esp + 0x24]
push esi
push edi
call dword [0x668114]
cmp word [ebx], 0
je 0x505fab
cmp word [ebx + 0x100], 0
je 0x505fab
cmp word [ebx + 0x282], 0
je 0x505fab
cmp word [ebx + 0x382], 0
je 0x505fab
mov esi, dword [ebp]
cmp esi, 0xffffffff
je 0x505ef3
call fcn.00506730
mov dword [ebp], 0xffffffff
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [ebp], eax
jne 0x505f20
mov eax, 0xffffff9d
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x18]
xor ecx, esp
call fcn.005d28b3
add esp, 0x1c
ret 4
mov esi, eax
call fcn.00506750
movzx eax, word [ebx + 0x100]
push eax
mov ecx, ebx
lea edi, [esp + 0x18]
call fcn.00504ff0
add esp, 4
test eax, eax
jne 0x505f92
mov edx, dword [ebp]
push 0x10
mov ecx, edi
push ecx
push edx
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x505f79
mov ecx, ebx
mov esi, ebp
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], eax
call fcn.00505d50
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x18]
xor ecx, esp
call fcn.005d28b3
add esp, 0x1c
ret 4
mov eax, 0xffffffa0
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x18]
xor ecx, esp
call fcn.005d28b3
add esp, 0x1c
ret 4
mov eax, 0xffffff9f
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x18]
xor ecx, esp
call fcn.005d28b3
add esp, 0x1c
ret 4
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebp
xor ecx, esp
mov eax, 0xffffff9c
call fcn.005d28b3
add esp, 0x1c
ret 4
Function at 0x506690
Capabilities:
Resolve dns

Disassembly:
sub esp, 0x14
mov eax, dword [0x6687b8]
xor eax, esp
mov dword [esp + 0x10], eax
xor eax, eax
push ebx
push ebp
mov dword [esp + 0xa], eax
mov dword [esp + 0xe], eax
mov dword [esp + 0x12], eax
mov word [esp + 0x16], ax
mov eax, dword [esp + 0x20]
push eax
xor ebp, ebp
mov word [esp + 0xc], 2
call dword [sym.imp.WS2_32.dll_htons]
test esi, esi
mov word [esp + 0xa], ax
jne 0x5066d4
xor ebx, ebx
jmp 0x506706
push esi
call dword [sym.imp.WS2_32.dll_inet_addr]
mov ebx, eax
test ebx, ebx
je 0x5066e6
cmp ebx, 0xffffffff
jne 0x506706
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x5066fa
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov ebx, dword [edx]
jmp 0x506706
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, eax
test ebp, ebp
jne 0x50671f
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov dword [edi], eax
mov dword [edi + 4], ebx
mov dword [edi + 8], ecx
mov dword [edi + 0xc], edx
mov eax, ebp
mov ecx, dword [esp + 0x18]
pop ebp
pop ebx
xor ecx, esp
call fcn.005d28b3
add esp, 0x14
ret

Function at 0x506750
Capabilities:
Set socket configuration

Disassembly:
sub esp, 8
push edi
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
mov eax, 0x1388
push 4
mov dword [esp + 8], eax
mov dword [esp + 0xc], eax
lea eax, [esp + 0xc]
push eax
push 0x1005
push 0xffff
push esi
call edi
cmp dword [esp + 4], 0
je 0x506796
push 4
lea ecx, [esp + 8]
push ecx
push 0x1006
push 0xffff
push esi
call edi
xor eax, eax
pop edi
add esp, 8
ret