joyce8/EMBER2024-capa huggingface dataset:
Function at 0x471310
Capabilities:
Check for software breakpoints

Disassembly:
push esi
mov esi, dword [esp + 8]
cmp dword [esi + 0x10], 0xca
jne 0x471343
push esi
call fcn.0047f6b0
mov eax, dword [esi + 0x40]
add esp, 4
test eax, eax
je 0x47133c
mov dword [esi + 0x10], 0xcf
mov eax, 1
pop esi
ret
mov dword [esi + 0x10], 0xcb
mov eax, dword [esi + 0x10]
cmp eax, 0xcb
jne 0x4713c9
mov eax, dword [esi + 0x1b0]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x4713b2
mov eax, dword [esi + 8]
test eax, eax
je 0x471367
push esi
call dword [eax]
add esp, 4
mov ecx, dword [esi + 0x1b0]
push esi
call dword [ecx]
add esp, 4
test eax, eax
je 0x4713ae
cmp eax, 2
je 0x4713b2
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x47135a
cmp eax, 3
je 0x47138d
cmp eax, 1
jne 0x47135a
mov eax, dword [ecx + 4]
inc eax
mov dword [ecx + 4], eax
mov eax, dword [esi + 8]
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
cmp edx, ecx
jl 0x47135a
mov edx, dword [esi + 0x13c]
add edx, ecx
mov dword [eax + 8], edx
jmp 0x47135a
xor eax, eax
pop esi
ret
mov eax, dword [esi + 0x90]
push esi
mov dword [esi + 0x98], eax
call fcn.004713f0
add esp, 4
pop esi
ret
cmp eax, 0xcc
je 0x4713d8
mov ecx, dword [esi]
push esi
call dword [ecx]
add esp, 4
push esi
call fcn.004713f0
add esp, 4
pop esi
ret

Function at 0x471c60
Capabilities:
Terminate process

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
je 0x471c81
mov ecx, dword [eax + 0x40]
test ecx, ecx
je 0x471c81
mov eax, dword [eax + 0x44]
test eax, eax
je 0x471c81
mov edx, dword [esp + 8]
push edx
push eax
call ecx
add esp, 8
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x48c500
Capabilities:
Check os version

Disassembly:
sub esp, 0x9c
push esi
push edi
mov ecx, 0x27
xor eax, eax
lea edi, [esp + 8]
xor esi, esi
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
lea eax, [esp + 8]
push eax
mov dword [esp + 0xc], 0x9c
call edi
test eax, eax
jne 0x48c54c
lea ecx, [esp + 8]
mov dword [esp + 8], 0x94
push ecx
call edi
test eax, eax
jne 0x48c54c
pop edi
pop esi
add esp, 0x9c
ret
cmp dword [esp + 0x18], 2
jne 0x48c55f
cmp dword [esp + 0xc], 5
jb 0x48c55f
mov esi, 1
mov eax, esi
pop edi
pop esi
add esp, 0x9c
ret
Function at 0x48dad0
Capabilities:
Get storage device properties

Disassembly:
mov eax, 0x2820
call fcn.004dc970
mov eax, dword [esp + 0x2824]
push ebx
push esi
push edi
push eax
lea ecx, [esp + 0x20]
push str..PhysicalDrive_d
push ecx
call fcn.004dddfd
add esp, 0xc
lea edx, [esp + 0x1c]
push 0
push 0
push 3
push 0
push 3
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x48dc7d
xor eax, eax
mov ecx, 0x9c4
mov dword [esp + 0x10], eax
lea edi, [esp + 0x11c]
mov dword [esp + 0x14], eax
mov ebx, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0xc]
push eax
push ecx
lea edx, [esp + 0x124]
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
push 0x2710
push edx
lea eax, [esp + 0x20]
push 0xc
push eax
push 0x2d1400
push esi
mov dword [esp + 0x2c], 0
call ebx
test eax, eax
je 0x48dc7d
mov ecx, dword [esp + 0x283c]
mov edx, dword [esp + 0x128]
push ecx
push 0
lea eax, [esp + 0x124]
push edx
push eax
call fcn.0048dc90
mov ecx, dword [esp + 0x2848]
mov edx, dword [esp + 0x13c]
push ecx
push 0
lea eax, [esp + 0x134]
push edx
push eax
call fcn.0048dc90
mov ecx, dword [esp + 0x2860]
mov edx, dword [esp + 0x150]
push ecx
push 0
lea eax, [esp + 0x144]
push edx
push eax
call fcn.0048dc90
mov ecx, dword [esp + 0x2864]
mov edx, dword [esp + 0x164]
push ecx
push 1
lea eax, [esp + 0x154]
push edx
push eax
call fcn.0048dc90
mov ecx, dword [esp + 0x2884]
add esp, 0x40
xor eax, eax
lea edi, [esp + 0x11c]
mov dword [ecx], 1
mov ecx, 0x9c4
lea edx, [esp + 0xc]
push eax
rep stosd dword es:[edi], eax
push edx
lea eax, [esp + 0x124]
push 0x2710
push eax
push 0
push 0
push 0x700a0
push esi
call ebx
test eax, eax
je 0x48dc7d
mov edi, dword [esp + 0x124]
mov edx, dword [esp + 0x2848]
mov eax, dword [esp + 0x284c]
xor ecx, ecx
cmp edi, 0xc
push esi
setne cl
inc ecx
mov dword [edx], ecx
mov ecx, dword [esp + 0x138]
mov edx, dword [esp + 0x13c]
mov dword [eax], ecx
mov dword [eax + 4], edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x2820
ret
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x2820
ret

Function at 0x490b90
Capabilities:
Capture webcam image

Disassembly:
mov eax, dword [esp + 8]
push ebx
push esi
mov esi, ecx
mov eax, dword [eax + 4]
cmp dword [esi + 0xec], 1
jne 0x490c33
test eax, eax
jbe 0x490c33
mov ecx, dword [esi + 0xbc]
test ecx, ecx
jle 0x490c33
mov ecx, dword [esi + 0x1c]
push edi
push 0
push eax
push 0x419
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov edi, eax
mov eax, dword [esi + 0xbc]
inc edi
test eax, eax
jne 0x490bde
xor esi, esi
jmp 0x490be4
mov esi, dword [esi + 0xb4]
add esi, 4
xor ebx, ebx
test edi, edi
jbe 0x490c0f
push ebp
mov ebp, edi
add esi, 6
push esi
call fcn.00493330
add esi, eax
push esi
mov ebx, esi
call fcn.00493330
add esp, 8
add esi, eax
dec edi
dec ebp
jne 0x490bf0
pop ebp
test edi, edi
pop edi
jne 0x490c33
test ebx, ebx
je 0x490c33
mov edx, dword [esp + 0x10]
push 0x4e
add edx, 0x10
push ebx
push edx
call fcn.004dca90
add esp, 0xc
mov eax, 1
pop esi
pop ebx
ret 0xc
pop esi
xor eax, eax
pop ebx
ret 0xc
Function at 0x490f85
Capabilities:
Capture webcam image

Disassembly:
sub esp, 0x44
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x49109d
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x49109d
mov eax, dword [esi + 0x3c]
push eax
call fcn.004ef3f1
mov esi, eax
test esi, esi
je 0x49109d
mov ebx, dword [esp + 0x58]
mov ecx, dword [esi + 0x1c]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push ebx
push 0x419
push ecx
call ebp
mov edi, eax
test edi, edi
jl 0x49109d
mov ecx, esi
call fcn.00490eb0
cmp edi, eax
jge 0x49109d
mov eax, dword [esi + 0xc4]
mov edx, dword [esi + 0xc0]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x5c]
xor ecx, ecx
mov dword [esp + 0x28], edx
cmp eax, ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x38], edi
jne 0x491023
mov dword [esp + 0x34], 1
jmp 0x49107e
mov edx, dword [esi + 0x1c]
lea ecx, [esp + 0x18]
push ecx
push ebx
push 0x433
push edx
call ebp
test eax, eax
je 0x49109d
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x24]
mov dword [esp + 0x10], ecx
mov dword [eax], 0
mov ecx, dword [esi + 0x1c]
lea eax, [esp + 0x10]
add edx, 2
push eax
push ecx
mov dword [esp + 0x1c], edx
call dword [sym.imp.USER32.dll_ClientToScreen]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x34], 3
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], eax
xor ecx, ecx
push ecx
lea ecx, [esp + 0x2c]
push ecx
push 0x7d8
call fcn.0048e440
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x44
ret 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x44
ret 0xc
Function at 0x49b1f8
Capabilities:
Access peb ldr_data
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x4fd664
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push esi
mov esi, ecx
push edi
mov dword [esp + 8], esi
call fcn.004eef9f
lea edi, [esi + 0x48]
mov dword [esp + 0x18], 0
mov dword [esp + 0xc], edi
lea ecx, [edi + 0x30]
mov dword [edi], fcn.0049a6e0
call fcn.0049a720
lea ecx, [edi + 0x44]
mov byte [esp + 0x18], 1
call fcn.0049a720
lea ecx, [edi + 0x64]
mov byte [esp + 0x18], 2
call fcn.0049a720
lea ecx, [edi + 0x78]
mov byte [esp + 0x18], 3
call fcn.0049a720
mov dword [edi], 0x54a610
lea ecx, [esi + 0xd4]
mov byte [esp + 0x18], 4
call fcn.0049ba40
mov ecx, dword [esp + 0x10]
mov dword [esi], method.CWnd.virtual_0
mov dword [esi + 0x34c], 1
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x14
ret

Function at 0x49b330
Capabilities:
Access peb ldr_data
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x4fd6d4
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push esi
mov esi, ecx
push edi
mov dword [esp + 8], esi
mov dword [esi], method.CWnd.virtual_0
lea ecx, [esi + 0xd4]
mov dword [esp + 0x18], 1
call fcn.0049bec0
lea edi, [esi + 0x48]
mov dword [esp + 0xc], edi
lea ecx, [edi + 0x78]
mov byte [esp + 0x18], 4
mov dword [ecx], 0x54a620
call fcn.0049a920
lea ecx, [edi + 0x64]
mov byte [esp + 0x18], 3
mov dword [ecx], 0x54a620
call fcn.0049a920
lea ecx, [edi + 0x44]
mov byte [esp + 0x18], 2
mov dword [ecx], 0x54a620
call fcn.0049a920
lea ecx, [edi + 0x30]
mov byte [esp + 0x18], 0
mov dword [ecx], 0x54a620
call fcn.0049a920
mov ecx, esi
mov dword [esp + 0x18], 0xffffffff
call fcn.004efa59
mov ecx, dword [esp + 0x10]
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x14
ret

Function at 0x49d4a0
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x208
push ebx
push ebp
push esi
push edi
mov esi, ecx
push 0
call fcn.004a38b0
mov ebp, dword [esp + 0x220]
mov eax, dword [esp + 0x21c]
push ebp
push 0
push 0
push eax
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
mov edi, eax
cmp edi, 0x20
ja 0x49d599
lea ecx, [esp + 0x10]
push ecx
push str..htm
push bind
mov ecx, esi
call fcn.00432ce0
test eax, eax
jne 0x49d599
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea edx, [esp + 0x10]
push str._shellopencommand
push edx
call ebx
lea eax, [esp + 0x10]
lea ecx, [esp + 0x10]
push eax
push ecx
push bind
mov ecx, esi
call fcn.00432ce0
test eax, eax
jne 0x49d599
lea edx, [esp + 0x10]
push 0x56c1cc
push edx
call fcn.004dd2a0
mov esi, eax
add esp, 8
test esi, esi
jne 0x49d56a
lea eax, [esp + 0x10]
push 0x56c1c8
push eax
call fcn.004dd2a0
mov esi, eax
add esp, 8
test esi, esi
jne 0x49d56a
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [esp + eax + 0xf]
jmp 0x49d56d
mov byte [esi], 0
push 0x56b990
push esi
call ebx
mov edx, dword [esp + 0x21c]
push edx
push esi
call ebx
lea eax, [esp + 0x10]
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_WinExec]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret 8
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret 8
Function at 0x4a37f0
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x4fde18
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push edi
mov edi, ecx
mov eax, dword [edi + 0x118]
test eax, eax
jne 0x4a38a0
mov eax, dword [0x576830]
push esi
mov dword [esp + 8], eax
push 0x104
push 0x104
lea ecx, [esp + 0x10]
mov dword [esp + 0x1c], 0
call fcn.004edd6e
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push 0xffffffffffffffff
lea ecx, [esp + 0xc]
call fcn.004eddbd
push str.winhlp32.exe
lea ecx, [esp + 0xc]
call fcn.004edd1a
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x4a3887
push 0x6a
push esi
call dword [sym.imp.USER32.dll_LoadCursorA]
test eax, eax
je 0x4a3887
push eax
call dword [sym.imp.USER32.dll_CopyIcon]
mov dword [edi + 0x118], eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea ecx, [esp + 8]
mov dword [esp + 0x14], 0xffffffff
call fcn.004ed98a
pop esi
mov ecx, dword [esp + 8]
pop edi
mov dword fs:[0], ecx
add esp, 0x10
ret
Function at 0x4a69a0
Capabilities:
Get number of processors

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4fe2a0
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push esi
push edi
mov edi, dword [esp + 0x30]
mov esi, ecx
mov eax, dword [edi]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x4a6b47
mov ecx, dword [0x576830]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ecx
mov dword [esp + 0x28], 0
mov dword [esp + 0x30], ecx
mov ecx, dword [eax - 8]
mov bl, 1
test ecx, ecx
mov byte [esp + 0x28], bl
jle 0x4a6a9c
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
push edi
push ecx
mov ecx, esi
call fcn.004a56c0
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0x2c], 2
call fcn.004eda77
lea ecx, [esp + 0x14]
mov byte [esp + 0x28], bl
call fcn.004ed98a
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
push 0x56b990
call fcn.004ed9f8
lea edx, [esp + 0x14]
push 0x3d
push edx
lea eax, [esp + 0x24]
push edi
push eax
mov ecx, esi
call fcn.004a5a80
push eax
lea ecx, [esp + 0x34]
mov byte [esp + 0x2c], 3
call fcn.004eda77
lea ecx, [esp + 0x18]
mov byte [esp + 0x28], bl
call fcn.004ed98a
lea ecx, [esp + 0xc]
call fcn.004ede52
mov ecx, dword [esp + 0xc]
push 0x56c3cc
push ecx
call fcn.004dc0c4
add esp, 8
test eax, eax
je 0x4a6ac4
mov edx, dword [edi]
mov ecx, dword [esp + 0x10]
mov eax, dword [edx - 8]
cmp ecx, eax
jl 0x4a69fd
mov esi, dword [esp + 0x34]
lea ecx, [esp + 0x30]
mov byte [esp + 0x28], 0
call fcn.004ed98a
lea ecx, [esp + 0xc]
mov dword [esp + 0x28], 0xffffffff
call fcn.004ed98a
jmp 0x4a6b4b
lea eax, [esp + 0x30]
mov ecx, esi
push eax
call fcn.004a6740
test eax, eax
push 0
je 0x4a6b2f
lea ecx, [esp + 0x34]
push 0x64
push ecx
mov ecx, esi
call fcn.004a4de0
mov ecx, dword [esp + 0x3c]
test ecx, ecx
je 0x4a6b15
cmp eax, 0x64
jg 0x4a6b03
mov edx, dword [esp + 0x38]
push eax
push 0x64
push edx
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov esi, eax
jmp 0x4a6aa0
push 0x64
push eax
mov eax, dword [esp + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov esi, eax
jmp 0x4a6aa0
cmp eax, 0x64
jge 0x4a6a9c
mov ecx, dword [esp + 0x34]
push 0x64
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov esi, eax
jmp 0x4a6aa0
mov edx, dword [esp + 0x3c]
lea eax, [esp + 0x34]
push edx
push eax
mov ecx, esi
call fcn.004a4de0
mov esi, eax
jmp 0x4a6aa0
mov esi, dword [esp + 0x34]
mov eax, dword [esp + 0x38]
cmp esi, eax
jl 0x4a6b55
mov eax, esi
mov ecx, dword [esp + 0x20]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
add esp, 0x20
ret 0x10
Function at 0x4b1cd0
Capabilities:
Terminate process

Disassembly:
push ecx
push ebx
push ebp
push esi
push 0x800
call fcn.004dcc77
mov esi, dword [esp + 0x18]
add esp, 4
mov edx, eax
xor ebp, ebp
test esi, esi
mov dword [esp + 0xc], edx
jne 0x4b1cf8
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
push edi
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
pop edi
cmp ecx, 0x800
jbe 0x4b1d13
pop esi
pop ebp
pop ebx
pop ecx
ret
mov al, byte [esi]
inc esi
test al, al
je 0x4b1de9
cmp ebp, 0x400
je 0x4b1dd4
cmp al, 0x25
jne 0x4b1db3
mov al, byte [esi]
inc esi
test al, al
je 0x4b1dcc
mov cl, byte [esi]
inc esi
test cl, cl
mov byte [esp + 0x14], cl
je 0x4b1dcc
movsx eax, al
push eax
call fcn.004de5dd
movsx ecx, byte [esp + 0x18]
push ecx
mov bl, al
call fcn.004de5dd
movsx edx, bl
push edx
mov byte [esp + 0x20], al
call fcn.004dc005
add esp, 0xc
test eax, eax
je 0x4b1de2
movsx eax, byte [esp + 0x14]
push eax
call fcn.004dc005
add esp, 4
test eax, eax
je 0x4b1de2
cmp bl, 0x39
jg 0x4b1d92
add bl, 0xd0
jmp 0x4b1d95
add bl, 0xa9
mov al, byte [esp + 0x14]
cmp al, 0x39
jg 0x4b1da1
add al, 0xd0
jmp 0x4b1da3
add al, 0xa9
mov ecx, dword [esp + 0xc]
shl bl, 4
add bl, al
mov edx, ecx
mov byte [ecx + ebp], bl
jmp 0x4b1dc0
cmp al, 0x2b
jne 0x4b1dbd
mov byte [edx + ebp], 0x20
jmp 0x4b1dc0
mov byte [edx + ebp], al
mov al, byte [esi]
inc ebp
inc esi
test al, al
jne 0x4b1d1e
cmp ebp, 0x400
jne 0x4b1de9
pop esi
pop ebp
mov byte [edx + 0x3ff], 0
mov eax, edx
pop ebx
pop ecx
ret
push 0
call fcn.004ded57
mov byte [edx + ebp], 0
pop esi
pop ebp
mov eax, edx
pop ebx
pop ecx
ret

Function at 0x4b5810
Capabilities:
Set socket configuration

Disassembly:
push ecx
mov ecx, dword [esp + 8]
lea eax, [esp]
push eax
push 0x8004667e
push ecx
mov dword [esp + 0xc], 0
call sub.WS2_32.dll_ioctlsocket
xor edx, edx
cmp eax, 0xffffffff
setne dl
mov eax, edx
pop ecx
ret

Function at 0x4b5840
Capabilities:
Set socket configuration

Disassembly:
push ecx
mov ecx, dword [esp + 8]
lea eax, [esp]
push eax
push 0x8004667e
push ecx
mov dword [esp + 0xc], 1
call sub.WS2_32.dll_ioctlsocket
xor edx, edx
cmp eax, 0xffffffff
setne dl
mov eax, edx
pop ecx
ret

Function at 0x4b5870
Capabilities:
Create tcp socket
Initialize winsock library

Disassembly:
sub esp, 0x190
lea eax, [esp]
push eax
push 1
call sub.WS2_32.dll_WSAStartup
test eax, eax
je 0x4b5890
or eax, 0xffffffff
add esp, 0x190
ret
push 6
push 1
push 2
call sub.WS2_32.dll_socket
add esp, 0x190
ret
Function at 0x4b58c0
Capabilities:
Connect socket
Get socket status

Disassembly:
sub esp, 0x228
push esi
mov esi, dword [esp + 0x234]
test esi, esi
je 0x4b5aae
mov ecx, dword [esp + 0x23c]
mov eax, 0x66666667
imul ecx
sar edx, 2
mov eax, edx
push ebx
shr eax, 0x1f
add edx, eax
push edi
test edx, edx
mov edi, 1
mov dword [esp + 0xc], edx
jg 0x4b5901
mov dword [esp + 0xc], edi
xor ecx, ecx
push esi
mov dword [esp + 0x18], ecx
mov word [esp + 0x18], 2
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], ecx
call sub.WS2_32.dll_inet_addr
mov edx, dword [esp + 0x240]
mov dword [esp + 0x18], eax
push edx
call sub.WS2_32.dll_htons
mov esi, dword [esp + 0x238]
mov word [esp + 0x16], ax
push esi
call fcn.004b5840
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetTickCount]
lea eax, [esp + 0x14]
push 0x10
push eax
push esi
call sub.WS2_32.dll_connect
test eax, eax
jge 0x4b5a97
call fcn.004b54b0
push eax
call fcn.004b5ac0
add esp, 4
cmp eax, 0xffffd8cd
je 0x4b5994
cmp eax, 0xffffd8cc
je 0x4b5994
push esi
mov edi, eax
call fcn.004b5810
add esp, 4
mov eax, edi
pop edi
pop ebx
pop esi
add esp, 0x228
ret
mov eax, dword [esp + 0xc]
mov dword [esp + 0x10], 0
test eax, eax
jle 0x4b5a49
lea ebx, [esi + 1]
lea ecx, [esp + 0x24]
lea edx, [esp + 0x2c]
push ecx
push 0
lea eax, [esp + 0x138]
push edx
push eax
push ebx
mov dword [esp + 0x44], esi
mov dword [esp + 0x40], edi
mov dword [esp + 0x148], esi
mov dword [esp + 0x144], edi
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0x2710
call sub.WS2_32.dll_select
cmp eax, 0xffffffff
je 0x4b5a7d
lea ecx, [esp + 0x2c]
push ecx
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x4b5a97
lea edx, [esp + 0x130]
push edx
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x4b5a97
mov ecx, dword [esp + 0x248]
mov eax, dword [esp + 0x24c]
cmp dword [ecx], eax
je 0x4b5a63
call fcn.004b54b0
test eax, eax
jne 0x4b5a7d
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x4b59ab
push esi
mov edi, 0xfffffff5
call fcn.004b5810
add esp, 4
mov eax, edi
pop edi
pop ebx
pop esi
add esp, 0x228
ret
push esi
mov edi, 0xffffffec
call fcn.004b5810
add esp, 4
mov eax, edi
pop edi
pop ebx
pop esi
add esp, 0x228
ret
push esi
mov edi, 0xfffffffb
call fcn.004b5810
add esp, 4
mov eax, edi
pop edi
pop ebx
pop esi
add esp, 0x228
ret
push esi
xor edi, edi
call fcn.004b5810
add esp, 4
mov eax, edi
pop edi
pop ebx
pop esi
add esp, 0x228
ret
xor eax, eax
pop esi
add esp, 0x228
ret
Function at 0x4b5ed0
Capabilities:
Get socket status
Send data
Send data on socket

Disassembly:
sub esp, 0x10c
mov ecx, dword [esp + 0x114]
push esi
mov esi, dword [esp + 0x114]
mov dword [esp + 0xc], 1
test ecx, ecx
mov dword [esp + 0x10], esi
jne 0x4b5f03
push ecx
lea eax, [esp + 0x10]
push ecx
push eax
push ecx
lea ecx, [esi + 1]
push ecx
jmp 0x4b5f5b
cmp ecx, 0xffffffff
jne 0x4b5f1a
mov dword [esp + 4], 0
mov dword [esp + 8], 0
jmp 0x4b5f49
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, ecx
mov dword [esp + 4], edx
mov ecx, 0x3e8
cdq
idiv ecx
lea eax, [edx + edx*4]
lea eax, [eax + eax*4]
lea edx, [eax + eax*4]
shl edx, 3
mov dword [esp + 8], edx
lea eax, [esp + 4]
lea ecx, [esp + 0xc]
push eax
push 0
push ecx
lea edx, [esi + 1]
push 0
push edx
call sub.WS2_32.dll_select
test eax, eax
jge 0x4b5f71
mov eax, 0xfffffffb
pop esi
add esp, 0x10c
ret
jne 0x4b5f80
mov eax, 0xfffffffa
pop esi
add esp, 0x10c
ret
lea eax, [esp + 0xc]
push eax
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4b5fd9
mov ecx, dword [esp + 0x11c]
mov edx, dword [esp + 0x120]
push 0
push ecx
push edx
push esi
call sub.WS2_32.dll_send
test eax, eax
jg 0x4b5fc1
call fcn.004b54b0
push eax
call fcn.004b5ac0
add esp, 4
pop esi
add esp, 0x10c
ret
mov ecx, dword [0x5b4e18]
test ecx, ecx
je 0x4b5fde
mov edx, dword [ecx]
pop esi
add edx, eax
mov dword [ecx], edx
add esp, 0x10c
ret
mov eax, 0xfffffff7
pop esi
add esp, 0x10c
ret

Function at 0x4b5ff0
Capabilities:
Resolve dns

Disassembly:
mov eax, dword [esp + 4]
push eax
call sub.WS2_32.dll_gethostbyname
test eax, eax
jne 0x4b5fff
ret
mov ecx, dword [eax + 0xc]
push esi
push edi
mov edx, dword [ecx]
mov eax, dword [edx]
push eax
call sub.WS2_32.dll_inet_ntoa
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x10]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
ret

Function at 0x4b6190
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x14
mov edx, dword [esp + 0x18]
lea eax, [esp]
lea ecx, [esp + 4]
push eax
push ecx
push edx
mov dword [esp + 0xc], 0x10
call sub.WS2_32.dll_getsockname
test eax, eax
jne 0x4b61c6
mov eax, dword [esp + 6]
push eax
call sub.WS2_32.dll_ntohs
and eax, 0xffff
add esp, 0x14
ret
or eax, 0xffffffff
add esp, 0x14
ret

Function at 0x4b61d0
Capabilities:
Get hostname
Resolve dns

Disassembly:
sub esp, 0x64
lea eax, [esp]
push esi
push 0x64
push eax
xor esi, esi
call sub.WS2_32.dll_gethostname
lea ecx, [esp + 4]
push ecx
call sub.WS2_32.dll_gethostbyname
test eax, eax
jne 0x4b61f5
pop esi
add esp, 0x64
ret
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
test eax, eax
je 0x4b6208
mov eax, dword [eax]
push eax
call sub.WS2_32.dll_inet_ntoa
mov esi, eax
mov eax, esi
pop esi
add esp, 0x64
ret
Function at 0x4b6530
Capabilities:
Terminate thread

Disassembly:
mov eax, dword [esp + 4]
push esi
mov esi, dword [esp + 0xc]
push esi
push eax
call fcn.004b6660
add esp, 8
test eax, eax
jne 0x4b6549
pop esi
ret
mov eax, dword [esi + 0x8c]
test eax, eax
jne 0x4b6555
pop esi
ret
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov dword [esi + 0x8c], 0
pop esi
ret

Function at 0x4b6570
Capabilities:
Terminate thread

Disassembly:
push esi
push edi
mov edi, dword [esp + 0x10]
mov eax, dword [edi + 0x38c]
mov esi, dword [edi]
push eax
call fcn.004b6870
add esp, 4
test esi, esi
je 0x4b65fa
mov edi, dword [esp + 0xc]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_TerminateThread]
mov eax, dword [esi + 0x8c]
test eax, eax
je 0x4b65ee
cmp dword [esi + 8], 0xffffffff
je 0x4b65ee
push 0
push eax
call ebp
mov dword [esi + 0x8c], 0
mov ecx, dword [edi + 0xa0]
test ecx, ecx
je 0x4b65dc
mov eax, dword [esi + 0x1c]
push 0
lea edx, [eax*8]
sub edx, eax
lea eax, [ecx + edx*4]
mov ecx, dword [ecx + edx*4 + 0x14]
mov edx, dword [eax + 0xc]
add ecx, edx
push ecx
jmp 0x4b65e0
push 0
push 0
push esi
push 8
push 0x15
push edi
call fcn.004b21e0
add esp, 0x18
mov esi, dword [esi + 0x48]
test esi, esi
jne 0x4b6596
mov edi, dword [esp + 0x14]
pop ebp
mov edx, dword [edi + 0x38c]
push edx
call fcn.004b6880
add esp, 4
pop edi
pop esi
ret

Function at 0x4b7a60
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
mov edx, eax
dec eax
test edx, edx
je 0x4b7a9c
push ebx
push esi
lea esi, [eax + 1]
mov eax, dword [esp + 0x14]
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
and edx, 0xff
xor edx, ebx
xor ebx, ebx
mov bl, ah
mov ax, word [edx*2 + 0x54a6d4]
xor ax, bx
inc ecx
dec esi
jne 0x4b7a78
pop esi
pop ebx
ret
mov ax, word [esp + 0xc]
ret