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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov dword [ebp - 0x20], ecx
push 0x568f00
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x4639cc
xor eax, eax
jmp 0x463a96
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
push ecx
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edx, dword [ebp - 0x20]
mov dword [edx + 8], eax
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 4], eax
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp - 4]
push ecx
call fcn.0048eff0
add esp, 0xc
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
lea ecx, [ebp - 8]
push ecx
push 1
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 8]
push eax
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
push 0
mov ecx, dword [ebp - 8]
push ecx
call fcn.00463c40
add esp, 8
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x463a6c
xor eax, eax
jmp 0x463a96
mov ecx, dword [ebp - 0x10]
call fcn.00463e60
mov edx, dword [ebp - 0x20]
mov dword [edx + 0x40], eax
mov ecx, dword [ebp - 0x10]
call fcn.00463e90
mov ecx, dword [ebp - 0x20]
mov dword [ecx + 0x44], eax
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x10]
mov dword [edx + 4], eax
mov eax, 1
mov esp, ebp
pop ebp
ret 8
Function at 0x463aa0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov dword [ebp - 0x1c], ecx
push 0
push 0x80
push 3
push 0
push 3
push SysReAllocStringLen
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
jne 0x463ad5
xor eax, eax
jmp 0x463b94
push 0
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x10]
push edx
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ecx, dword [ebp - 0x1c]
mov dword [ecx + 8], eax
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 4], eax
mov dword [ebp - 0x18], 0
push 0
lea ecx, [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
lea ecx, [ebp - 8]
push ecx
push 1
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 8]
push eax
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
push 0
mov ecx, dword [ebp - 8]
push ecx
call fcn.00463c40
add esp, 8
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0xc], 0
jne 0x463b6a
xor eax, eax
jmp 0x463b94
mov ecx, dword [ebp - 0xc]
call fcn.00463e60
mov ecx, dword [ebp - 0x1c]
mov dword [ecx + 0x40], eax
mov ecx, dword [ebp - 0xc]
call fcn.00463e90
mov edx, dword [ebp - 0x1c]
mov dword [edx + 0x44], eax
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0xc]
mov dword [eax + 4], ecx
mov eax, 1
mov esp, ebp
pop ebp
ret 4
Function at 0x4695f4
Capabilities:
Connect socket

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ecx + 4]
call dword [sym.imp.WSOCK32.dll_connect]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop ebp
ret 8

Function at 0x46ab2d
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
xor ebx, ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 4], ebx
cmp dword [ebp + 0xc], ebx
je 0x46ab75
call fcn.0046beb2
mov esi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x46ab75
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 4], eax
test eax, eax
je 0x46abb8
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
mov esi, dword [ebp + 8]
mov dword [ebp + 0xc], 1
test ebx, ebx
je 0x46aba1
push dword [ebp + 0x10]
mov eax, dword [edi]
push ebx
push esi
mov ecx, edi
call dword [eax + 0x20]
cmp dword [ebp - 4], 0
mov dword [ebp + 0xc], eax
je 0x46aba1
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FreeResource]
cmp dword [esi + 0x4c], 0
je 0x46abb5
mov ecx, dword [esi + 0x4c]
push dword [ebp + 0x10]
mov eax, dword [ecx]
call dword [eax + 0xa0]
mov eax, dword [ebp + 0xc]
pop edi
pop esi
pop ebx
leave
ret 0xc

Function at 0x474c88
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
xor ebx, ebx
xor edi, edi
mov dword [ebp - 4], ecx
cmp dword [ebp + 8], ebx
je 0x474ccf
call fcn.0046beb2
mov esi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x474ccf
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
test ebx, ebx
je 0x474ceb
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
mov ecx, dword [ebp - 4]
push edi
call fcn.00474800
mov esi, eax
test edi, edi
je 0x474ce9
test ebx, ebx
je 0x474ce9
push ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 4

Function at 0x475416
Capabilities:
Get graphical window text

Disassembly:
push 4
mov eax, 0x5517c0
call fcn.004901ba
mov esi, ecx
cmp dword [esi + 0x50], 0
jne 0x47543b
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi + 0x20]
call dword [sym.imp.USER32.dll_GetWindowTextW]
jmp 0x475481
lea ecx, [ebp - 0x10]
call fcn.0040acc0
mov ecx, dword [esi + 0x50]
mov eax, dword [ecx]
and dword [ebp - 4], 0
lea edx, [ebp - 0x10]
push edx
call dword [eax + 0x8c]
push 0xffffffffffffffff
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00414860
add esp, 0x10
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
mov esi, eax
call fcn.00407ae0
mov eax, esi
call fcn.00490292
ret 8
Function at 0x476152
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
push dword [ebp + 8]
xor esi, esi
mov dword [ebp - 8], esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
jne 0x476184
push dword [ebp + 8]
call edi
push eax
call fcn.00479e2a
mov ebx, dword [ebp + 0xc]
movzx eax, byte [ebx + 0x20]
cmp eax, dword [ebp - 4]
je 0x4761af
test byte [ebp - 4], 1
je 0x4761af
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x4761af
push dword [ebp + 8]
call edi
push eax
call fcn.00479e2a
lea eax, [ebx + 8]
mov ecx, dword [eax]
or ecx, dword [eax + 4]
je 0x476269
lea ecx, [ebp - 0x20]
push ecx
push eax
call fcn.004760b4
pop ecx
lea eax, [ebx + 0x10]
pop ecx
mov ecx, dword [eax]
or ecx, dword [eax + 4]
je 0x4761e5
lea ecx, [ebp - 0x10]
push ecx
push eax
call fcn.004760b4
pop ecx
lea eax, [ebp - 0x10]
pop ecx
mov dword [ebp - 8], eax
mov eax, dword [ebx]
or eax, dword [ebx + 4]
je 0x4761fb
lea eax, [ebp - 0x18]
push eax
push ebx
call fcn.004760b4
pop ecx
pop ecx
lea esi, [ebp - 0x18]
push 0
push 0x80
push 3
push 0
push 1
push 0xc0000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x476228
push dword [ebp + 8]
call edi
push eax
call fcn.00479e2a
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 8]
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x476254
call edi
push ebx
mov dword [ebp - 8], eax
call esi
push dword [ebp + 8]
push dword [ebp - 8]
call fcn.00479e2a
push ebx
call esi
test eax, eax
jne 0x476266
push dword [ebp + 8]
call edi
push eax
call fcn.00479e2a
mov ebx, dword [ebp + 0xc]
movzx eax, byte [ebx + 0x20]
cmp eax, dword [ebp - 4]
je 0x476291
test byte [ebp - 4], 1
jne 0x476291
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x476291
push dword [ebp + 8]
call edi
push eax
call fcn.00479e2a
pop edi
pop esi
pop ebx
leave
ret 8

Function at 0x4857c8
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, ecx
mov dword [edi + 0x58], ebx
test ebx, 0xffff0000
jne 0x4857ec
cmp dword [edi + 0x54], 0
jne 0x4857ec
movzx eax, bx
mov dword [edi + 0x54], eax
call fcn.0046beb2
mov esi, dword [eax + 0xc]
push 5
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push esi
push dword [ebp + 0xc]
mov ebx, eax
push ebx
mov ecx, edi
call fcn.00485789
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
ret 8

Function at 0x488ec3
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x5be094]
jne 0x488ecd
repz ret
jmp fcn.00493048
Function at 0x49dc8c
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.00491cb0
and dword [ebp - 4], 0
cmp dword [0x5c5988], 0
mov ebx, eax
jne 0x49dd3d
push 0x571084
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
test edi, edi
je 0x49ddee
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x571078
push edi
call esi
test eax, eax
je 0x49ddee
push eax
call fcn.00491c3e
mov dword [esp], 0x571068
push edi
mov dword [0x5c5988], eax
call esi
push eax
call fcn.00491c3e
mov dword [esp], 0x571054
push edi
mov dword [0x5c598c], eax
call esi
push eax
call fcn.00491c3e
mov dword [esp], str.GetUserObjectInformationW
push edi
mov dword [0x5c5990], eax
call esi
push eax
call fcn.00491c3e
pop ecx
mov dword [0x5c5998], eax
test eax, eax
je 0x49dd3d
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00491c3e
pop ecx
mov dword [0x5c5994], eax
mov eax, dword [0x5c5994]
cmp eax, ebx
je 0x49dd95
cmp dword [0x5c5998], ebx
je 0x49dd95
push eax
call fcn.00491cb9
push dword [0x5c5998]
mov esi, eax
call fcn.00491cb9
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x49dd95
test edi, edi
je 0x49dd95
call esi
test eax, eax
je 0x49dd8c
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x49dd8c
test byte [ebp - 0xc], 1
jne 0x49dd95
or dword [ebp + 0x10], 0x200000
jmp 0x49ddce
mov eax, dword [0x5c598c]
cmp eax, ebx
je 0x49ddce
push eax
call fcn.00491cb9
pop ecx
test eax, eax
je 0x49ddce
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x49ddce
mov eax, dword [0x5c5990]
cmp eax, ebx
je 0x49ddce
push eax
call fcn.00491cb9
pop ecx
test eax, eax
je 0x49ddce
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x5c5988]
call fcn.00491cb9
pop ecx
test eax, eax
je 0x49ddee
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x49ddf0
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x49fdbc
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.00491cb0
and dword [ebp - 4], 0
cmp dword [0x5c59a4], 0
mov ebx, eax
jne 0x49fe6d
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x49ff1e
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x49ff1e
push eax
call fcn.00491c3e
mov dword [esp], 0x571068
push edi
mov dword [0x5c59a4], eax
call esi
push eax
call fcn.00491c3e
mov dword [esp], 0x571054
push edi
mov dword [0x5c59a8], eax
call esi
push eax
call fcn.00491c3e
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x5c59ac], eax
call esi
push eax
call fcn.00491c3e
pop ecx
mov dword [0x5c59b4], eax
test eax, eax
je 0x49fe6d
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00491c3e
pop ecx
mov dword [0x5c59b0], eax
mov eax, dword [0x5c59b0]
cmp eax, ebx
je 0x49fec5
cmp dword [0x5c59b4], ebx
je 0x49fec5
push eax
call fcn.00491cb9
push dword [0x5c59b4]
mov esi, eax
call fcn.00491cb9
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x49fec5
test edi, edi
je 0x49fec5
call esi
test eax, eax
je 0x49febc
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x49febc
test byte [ebp - 0xc], 1
jne 0x49fec5
or dword [ebp + 0x10], 0x200000
jmp 0x49fefe
mov eax, dword [0x5c59a8]
cmp eax, ebx
je 0x49fefe
push eax
call fcn.00491cb9
pop ecx
test eax, eax
je 0x49fefe
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x49fefe
mov eax, dword [0x5c59ac]
cmp eax, ebx
je 0x49fefe
push eax
call fcn.00491cb9
pop ecx
test eax, eax
je 0x49fefe
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x5c59a4]
call fcn.00491cb9
pop ecx
test eax, eax
je 0x49ff1e
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x49ff20
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4a8540
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x194
mov eax, dword [0x5be094]
xor eax, esp
mov dword [esp + 0x190], eax
lea eax, [esp]
push eax
push 0x202
call dword [sym.imp.WSOCK32.dll_WSAStartup]
test eax, eax
jne 0x4a8590
mov ax, word [esp]
cmp al, 2
jne 0x4a858a
cmp ah, al
jne 0x4a858a
xor eax, eax
mov ecx, dword [esp + 0x190]
xor ecx, esp
call fcn.00488ec3
add esp, 0x194
ret
call dword [sym.imp.WSOCK32.dll_WSACleanup]
mov ecx, dword [esp + 0x190]
xor ecx, esp
mov eax, 2
call fcn.00488ec3
add esp, 0x194
ret

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

Disassembly:
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
push 0
push eax
push ecx
push edx
call dword [sym.imp.WSOCK32.dll_recv]
cmp eax, 0xffffffff
jne 0x4b3f92
call dword [sym.imp.WSOCK32.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 0x4b40e0
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esi + 0x164]
test ecx, ecx
je 0x4b40fb
mov edx, dword [esi + 0xf4]
push edx
push edi
push ebx
push eax
push esi
call ecx
add esp, 0x14
ret
test eax, eax
jl 0x4b412f
cmp eax, 2
jg 0x4b412f
mov ecx, dword [esi + 0xf0]
push ecx
push 1
lea edx, [eax + eax*2 + 0x57364c]
push 2
push edx
call fcn.0048e0db
mov eax, dword [esi + 0xf0]
push eax
push 1
push edi
push ebx
call fcn.0048e0db
add esp, 0x20
xor eax, eax
ret

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

Disassembly:
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 8]
push ebx
push esi
mov esi, dword [esp + 0xc]
mov eax, dword [esi + eax*4 + 0x130]
push edi
push 0
push ecx
push edx
push eax
call dword [sym.imp.WSOCK32.dll_send]
mov ebx, dword [esp + 0x20]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebx], 0
jne 0x4b44bd
push ebp
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov ebp, eax
cmp ebp, 0x2733
jne 0x4b4494
pop ebp
pop edi
pop esi
mov dword [ebx], 0x51
xor eax, eax
pop ebx
ret
push ebp
push esi
call fcn.004b8340
push eax
mov eax, dword [esi]
push str.Send_failure:__s
push eax
call fcn.004b42c0
mov ecx, dword [esi]
add esp, 0x14
mov dword [ecx + 0x856c], ebp
mov dword [ebx], 0x37
mov eax, edi
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x4b4c80
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x10c
mov eax, dword [0x5be094]
xor eax, esp
mov dword [esp + 0x108], eax
push ebx
push ebp
mov ebp, dword [esp + 0x118]
cmp dword [ebp + 0x19c], 0
push esi
push edi
mov edi, dword [ebp]
mov dword [esp + 0x14], edi
jne 0x4b4dbb
mov esi, dword [esp + 0x124]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x1c]
push ecx
mov ebx, 0x80
push esi
mov dword [esp + 0x1c], ebx
call dword [sym.imp.WSOCK32.dll_getpeername]
test eax, eax
je 0x4b4cfc
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebp
call fcn.004b8340
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
push edi
call fcn.004b42c0
add esp, 0x18
jmp 0x4b4dc4
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x9c]
push eax
push esi
mov dword [esp + 0x1c], ebx
call dword [sym.imp.WSOCK32.dll_getsockname]
test eax, eax
je 0x4b4d3c
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebp
call fcn.004b8340
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
call fcn.004b42c0
add esp, 0x18
jmp 0x4b4dc4
lea ebx, [ebp + 0xcc]
lea edi, [ebp + 0x9e]
lea esi, [esp + 0x18]
call fcn.004b4c40
test eax, eax
jne 0x4b4d7a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebp
call fcn.004b8340
mov ecx, dword [esp + 0x1c]
push eax
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push ecx
call fcn.004b42c0
add esp, 0x18
jmp 0x4b4dc4
lea ebx, [ebp + 0x100]
lea edi, [ebp + 0xd0]
lea esi, [esp + 0x98]
call fcn.004b4c40
test eax, eax
jne 0x4b4dbb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebp
call fcn.004b8340
mov edx, dword [esp + 0x1c]
push eax
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push edx
call fcn.004b42c0
add esp, 0x18
jmp 0x4b4dc4
push ebp
call fcn.004b4be0
add esp, 4
mov ecx, dword [esp + 0x118]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00488ec3
add esp, 0x10c
ret

Function at 0x4b4de0
Capabilities:
Set socket configuration

Disassembly:
push ecx
push esi
mov esi, dword [edi]
mov eax, dword [esi + 0x314]
push 4
lea ecx, [esp + 8]
push ecx
push 1
push 6
push edx
mov dword [esp + 0x18], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x4b4e23
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
push edi
call fcn.004b8340
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.004b4230
add esp, 0x14
pop esi
pop ecx
ret
push str.TCP_NODELAY_set_n
push esi
call fcn.004b4230
add esp, 8
pop esi
pop ecx
ret

Function at 0x4b4e40
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0xc
push esi
mov esi, dword [esp + 0x14]
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 8]
push ecx
push 0x1001
push 0xffff
push esi
mov dword [esp + 0x1c], 0x4020
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], 4
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x4b4e89
mov edx, dword [esp + 4]
cmp edx, dword [esp + 8]
jg 0x4b4ea1
push 4
lea eax, [esp + 0xc]
push eax
push 0x1001
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
pop esi
add esp, 0xc
ret
Function at 0x4b4eb0
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov ecx, dword [esp + 4]
mov eax, dword [ecx + 0x530]
cmp eax, 0xffffffff
je 0x4b4f09
mov ecx, dword [ecx + 0x524]
mov edx, dword [ecx]
cmp dword [edx + eax*4], 0
lea eax, [edx + eax*4]
je 0x4b4f09
mov ecx, dword [esp + 8]
test ecx, ecx
mov eax, dword [eax]
je 0x4b4edc
mov dword [ecx], eax
cmp dword [eax + 0x148], 0
push esi
mov esi, dword [eax + 0x130]
jne 0x4b4f00
push 2
push 1
lea eax, [esp + 0x10]
push eax
push esi
call dword [sym.imp.WSOCK32.dll_recv]
test eax, eax
jne 0x4b4f05
or eax, 0xffffffff
pop esi
ret
mov eax, esi
pop esi
ret
or eax, 0xffffffff
ret
Function at 0x4b6890
Capabilities:
Set socket configuration

Disassembly:
push esi
mov esi, dword [esp + 8]
mov al, byte [esi]
xor edx, edx
test al, al
mov ecx, esi
je 0x4b68b6
nop
cmp al, 0x2e
jne 0x4b68a7
add edx, 1
mov al, byte [ecx + 1]
add ecx, 1
test al, al
jne 0x4b68a0
cmp edx, 3
je 0x4b68bc
xor eax, eax
pop esi
ret 8
push esi
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
je 0x4b68b6
mov ecx, dword [esp + 0xc]
mov dword [ecx], eax
mov eax, 1
pop esi
ret 8

Function at 0x4b6950
Capabilities:
Resolve dns

Disassembly:
mov ecx, dword [esp + 4]
mov eax, dword [esp + 0x14]
push esi
mov esi, dword [esp + 0x1c]
mov dword [esi], 0
push ecx
mov byte [eax], 0
call dword [sym.imp.WSOCK32.dll_gethostbyname]
mov ecx, eax
test ecx, ecx
mov dword [esp + 0x1c], ecx
je 0x4b69f4
cmp word [ecx + 8], 2
push ebx
push ebp
push edi
jne 0x4b69c5
cmp word [ecx + 0xa], 4
jne 0x4b69c5
mov edi, dword [ecx + 0xc]
mov eax, dword [edi]
test eax, eax
je 0x4b69c5
mov ebx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x18]
lea esp, [esp]
mov edx, dword [eax]
mov eax, dword [esp + 0x20]
push edx
push eax
push ebx
push ebp
call fcn.004b68e0
test eax, eax
mov dword [esi], eax
je 0x4b69e8
add edi, 4
lea esi, [eax + 0x1c]
mov eax, dword [edi]
test eax, eax
jne 0x4b69a0
mov ecx, dword [esp + 0x28]
mov ecx, dword [ecx]
mov edx, dword [esp + 0x24]
push 0x400
push ecx
push 0x401
push edx
call fcn.0049aec6
add esp, 0x10
pop edi
pop ebp
pop ebx
xor eax, eax
pop esi
ret 0x18
pop edi
pop ebp
pop ebx
mov eax, 8
pop esi
ret 0x18
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
add eax, 0xffffd507
cmp eax, 3
ja case.0x4b6a04.11001
jmp dword [eax*4 + 0x4b6a28]
mov eax, 0x2af9
pop esi
ret 0x18
mov eax, 0x2afa
pop esi
ret 0x18
mov eax, 0x2afb
pop esi
ret 0x18
Function at 0x4b7260
Capabilities:
Get common file path

Disassembly:
sub esp, 0x230
mov eax, dword [0x5be094]
xor eax, esp
mov dword [esp + 0x22c], eax
cmp dword [0x5c5c64], 0
mov dword [esp], str.getaddrinfo
mov dword [esp + 4], 0x4b6cb0
mov dword [esp + 8], str.getnameinfo
mov dword [esp + 0xc], 0x4b6fa0
mov dword [esp + 0x10], str.freeaddrinfo
mov dword [esp + 0x14], fcn.004b6c60
je 0x4b72d2
movzx eax, word [esp + 0x234]
mov eax, dword [eax*8 + 0x5bf5f4]
mov ecx, dword [esp + 0x22c]
xor ecx, esp
call fcn.00488ec3
add esp, 0x230
ret 4
push 0x104
lea ecx, [esp + 0x128]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x4b73cf
push ebx
push ebp
push esi
push edi
lea edx, [esp + 0x134]
push edx
lea eax, [esp + 0x2c]
push 0x10c
push eax
call fcn.00495428
push str.ws2_32
lea ecx, [esp + 0x38]
push 0x10c
push ecx
call fcn.0049ae52
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
add esp, 0x18
lea edx, [esp + 0x28]
push edx
call edi
mov ebp, dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x4b734d
push str.getaddrinfo
push esi
call ebx
test eax, eax
jne 0x4b7394
push esi
call ebp
lea eax, [esp + 0x134]
push eax
lea ecx, [esp + 0x2c]
push 0x10c
push ecx
call fcn.00495428
push str.wship6
lea edx, [esp + 0x38]
push 0x10c
push edx
call fcn.0049ae52
add esp, 0x18
lea eax, [esp + 0x28]
push eax
call edi
mov esi, eax
test esi, esi
je 0x4b73cb
push str.getaddrinfo
push esi
call ebx
test eax, eax
je 0x4b73ff
xor edi, edi
mov ecx, dword [esp + edi*8 + 0x10]
push ecx
push esi
call ebx
test eax, eax
mov dword [esp + edi*8 + 0x14], eax
je 0x4b73ff
add edi, 1
cmp edi, 3
jl 0x4b7396
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
mov dword [0x5bf5f4], edx
mov dword [0x5bf5fc], eax
mov dword [fcn.004b6c60], ecx
pop edi
pop esi
pop ebp
pop ebx
movzx edx, word [esp + 0x234]
mov ecx, dword [esp + 0x22c]
mov eax, dword [edx*8 + 0x5bf5f4]
xor ecx, esp
mov dword [0x5c5c64], 1
call fcn.00488ec3
add esp, 0x230
ret 4
push esi
call ebp
jmp 0x4b73cb

Function at 0x4b7960
Capabilities:
Create thread

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
push 0
push 0
push eax
push ecx
push 0
push 0
call fcn.004908cc
add esp, 0x18
test eax, eax
je 0x4b7983
cmp eax, 0xffffffff
jne 0x4b7985
xor eax, eax
ret