joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4c3234
Capabilities:
Inspect load icon resource

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdfc
push ebx
push esi
test dl, dl
je 0x4c324b
add esp, 0xfffffff0
call fcn.00405ab0
mov byte [ebp - 1], dl
mov ebx, eax
xor edx, edx
mov eax, ebx
call fcn.00447498
mov eax, dword [0x5b1438]
cmp byte [eax], 0
jne 0x4c3278
push 0
call sub.ole32.dll_OleInitialize
test eax, 0x80000000
sete al
mov byte [ebx + 0x17c], al
mov eax, dword [0x5b1a1c]
cmp word [eax + 2], 0
jne 0x4c3292
mov eax, dword [0x5b1a1c]
mov dword [eax + 4], ebx
mov dword [eax], fcn.004c532c
mov eax, dword [0x5b1c24]
cmp word [eax + 2], 0
jne 0x4c32ac
mov eax, dword [0x5b1c24]
mov dword [eax + 4], ebx
mov dword [eax], fcn.004c553c
mov byte [ebx + 0x35], 0
mov dl, 1
mov eax, dword [0x454aa0]
call fcn.0045ad74
mov esi, eax
mov dword [ebx + 0x3c], esi
mov dword [esi + 0xc], ebx
mov dword [esi + 8], 0x4c5aec
mov dl, 1
mov eax, dword [0x43046c]
call fcn.0040554c
mov dword [ebx + 0x90], eax
mov dl, 1
mov eax, dword [0x43046c]
call fcn.0040554c
mov dword [ebx + 0xb0], eax
xor eax, eax
mov dword [ebx + 0x60], eax
xor eax, eax
mov dword [ebx + 0x84], eax
mov dword [ebx + 0x5c], 0xff000018
mov dword [ebx + 0x78], 0x1f4
mov byte [ebx + 0x7c], 1
xor eax, eax
mov dword [ebx + 0x80], eax
mov dword [ebx + 0x74], 0x9c4
mov byte [ebx + 0x88], 0
mov byte [ebx + 0xa5], 1
mov byte [ebx + 0xbc], 1
mov dl, 1
mov eax, dword [0x458f38]
call fcn.004641e4
mov esi, eax
mov dword [ebx + 0xa0], esi
push 0x4c348c
mov eax, dword [0x5b17c4]
mov eax, dword [eax]
push eax
call sub.user32.dll_LoadIconW
mov edx, eax
mov eax, esi
call fcn.00464678
mov eax, dword [ebx + 0xa0]
mov dword [eax + 0x14], ebx
mov dword [eax + 0x10], 0x4c5dd4
mov dl, 1
mov eax, dword [0x43046c]
call fcn.0040554c
mov dword [ebx + 0x98], eax
push pe_nt_image_headers32
lea eax, [ebp - 0x202]
push eax
mov eax, dword [0x5b17c4]
mov eax, dword [eax]
push eax
call sub.kernel32.dll_GetModuleFileNameW_1
lea eax, [ebp - 0x202]
mov dx, 0x5c
call fcn.00415338
test eax, eax
je 0x4c33bd
lea edx, [eax + 2]
lea eax, [ebp - 0x202]
call fcn.004150c8
lea eax, [ebp - 0x202]
mov dx, 0x2e
call fcn.0041531c
test eax, eax
je 0x4c33d5
mov word [eax], 0
lea eax, [ebp - 0x202]
push eax
call sub.user32.dll_CharNextW_1
push eax
call sub.user32.dll_CharLowerW
lea eax, [ebx + 0x8c]
lea edx, [ebp - 0x202]
mov ecx, pe_nt_image_headers32
call fcn.00407720
push ebx
push 0x4c4cfc
call fcn.004b8f44
mov dword [ebx + 0x178], eax
mov byte [ebx + 0xd0], 0
mov eax, dword [0x5b1438]
cmp byte [eax], 0
jne 0x4c3426
mov eax, ebx
call fcn.004c3600
mov byte [ebx + 0x59], 1
mov byte [ebx + 0x5a], 1
mov byte [ebx + 0x5b], 1
mov byte [ebx + 0xa6], 1
mov byte [ebx + 0xd1], 0
mov byte [ebx + 0xdc], 0
xor eax, eax
mov dword [ebx + 0xd4], eax
mov byte [ebx + 0xd3], 0
xor eax, eax
mov dword [ebx + 0xa8], eax
mov eax, ebx
call fcn.004c6000
mov eax, ebx
call fcn.004c6c34
mov eax, ebx
cmp byte [ebp - 1], 0
je 0x4c3483
call fcn.00405b08
pop dword fs:[0]
add esp, 0xc
mov eax, ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4c38d4
Capabilities:
Enumerate gui resources

Disassembly:
push ebx
push esi
add esp, 0xfffffff8
mov ebx, eax
mov eax, dword [ebx + 0x170]
test eax, eax
je 0x4c3976
cmp dword [ebx + 0x94], 0
jne 0x4c3970
mov dword [esp], eax
mov byte [esp + 4], dl
mov eax, esp
push eax
push 0x4c3820
call sub.user32.dll_EnumWindows
mov eax, dword [ebx + 0x90]
cmp dword [eax + 8], 0
je 0x4c3970
push 3
mov eax, dword [esp + 4]
push eax
call sub.user32.dll_GetWindow
mov esi, eax
mov dword [esp], esi
push 0xffffffffffffffec
push esi
call sub.user32.dll_GetWindowLongW
test al, 8
je 0x4c3936
mov dword [esp], 0xfffffffe
mov eax, dword [ebx + 0x90]
mov esi, dword [eax + 8]
dec esi
cmp esi, 0
jl 0x4c3970
push 0x213
push 0
push 0
push 0
push 0
mov eax, dword [esp + 0x14]
push eax
mov edx, esi
mov eax, dword [ebx + 0x90]
call fcn.0043b4c0
push eax
call sub.user32.dll_SetWindowPos
dec esi
cmp esi, 0xffffffff
jne 0x4c3945
inc dword [ebx + 0x94]
pop ecx
pop edx
pop esi
pop ebx
ret

Function at 0x4c3b94
Capabilities:
Enumerate gui resources
Hide graphical window

Disassembly:
push ebx
push esi
push edi
mov ebx, edx
mov esi, eax
mov eax, dword [0x5b72c0]
cmp dword [eax + 0x170], 0
je 0x4c3cf9
test bl, bl
jne 0x4c3c47
cmp dword [esi + 0x9c], 0
jne 0x4c3c3c
mov eax, esi
call fcn.004c6a84
push eax
push 0x4c3aa0
call sub.user32.dll_EnumWindows
cmp dword [esi + 0x44], 0
je 0x4c3c0d
mov eax, dword [0x5b72c0]
cmp byte [eax + 0xd3], 0
je 0x4c3c0d
mov eax, dword [esi + 0xd8]
call fcn.00408d70
mov edi, eax
cmp edi, 0
jl 0x4c3c0d
push 0
mov eax, dword [esi + 0xd8]
mov eax, dword [eax + edi*4]
push eax
call sub.user32.dll_ShowWindow
dec edi
cmp edi, 0xffffffff
jne 0x4c3bf6
mov eax, dword [esi + 0x98]
mov edi, dword [eax + 8]
dec edi
cmp edi, 0
jl 0x4c3c3c
cmp bl, 1
cmc
sbb eax, eax
push eax
mov edx, edi
mov eax, dword [esi + 0x98]
call fcn.0043b4c0
push eax
call sub.user32.dll_ShowOwnedPopups
dec edi
cmp edi, 0xffffffff
jne 0x4c3c1c
inc dword [esi + 0x9c]
jmp 0x4c3cf9
cmp dword [esi + 0x9c], 0
jle 0x4c3cf9
dec dword [esi + 0x9c]
cmp dword [esi + 0x9c], 0
jne 0x4c3cf9
cmp dword [esi + 0x44], 0
je 0x4c3ca4
mov eax, dword [0x5b72c0]
cmp byte [eax + 0xd3], 0
je 0x4c3ca4
mov eax, dword [esi + 0xd8]
call fcn.00408d70
mov edi, eax
cmp edi, 0
jl 0x4c3ca4
push 5
mov eax, dword [esi + 0xd8]
mov eax, dword [eax + edi*4]
push eax
call sub.user32.dll_ShowWindow
dec edi
cmp edi, 0xffffffff
jne 0x4c3c8d
mov eax, dword [esi + 0x98]
mov edi, dword [eax + 8]
dec edi
cmp edi, 0
jl 0x4c3cd3
cmp bl, 1
cmc
sbb eax, eax
push eax
mov edx, edi
mov eax, dword [esi + 0x98]
call fcn.0043b4c0
push eax
call sub.user32.dll_ShowOwnedPopups
dec edi
cmp edi, 0xffffffff
jne 0x4c3cb3
mov eax, dword [esi + 0x98]
mov edx, dword [eax]
call dword [edx + 8]
push 0
lea eax, [esi + 0xd8]
mov ecx, 1
mov edx, dword [0x4b6e1c]
call fcn.00408f30
add esp, 4
pop edi
pop esi
pop ebx
ret
Function at 0x4c4948
Capabilities:
Get graphical window text

Disassembly:
push ebx
push esi
add esp, 0xfffffdfc
mov esi, edx
mov ebx, eax
cmp byte [ebx + 0xac], 0
je 0x4c49b3
cmp byte [ebx + 0xd3], 0
jne 0x4c49b3
push pe_nt_image_headers32
lea eax, [esp + 4]
push eax
mov eax, dword [ebx + 0x170]
push eax
call sub.user32.dll_GetWindowTextW
mov ecx, eax
mov edx, esp
mov eax, esi
call fcn.00407664
mov eax, dword [esi]
mov dword [esp + 0x200], eax
mov eax, dword [esp + 0x200]
test eax, eax
je 0x4c49a0
sub eax, 4
mov eax, dword [eax]
test eax, eax
jne 0x4c49c0
mov eax, esi
mov edx, dword [ebx + 0x8c]
call fcn.00407528
jmp 0x4c49c0
mov eax, esi
mov edx, dword [ebx + 0x8c]
call fcn.00407528
add esp, 0x204
pop esi
pop ebx
ret

Function at 0x4c61e8
Capabilities:
Hide graphical window

Disassembly:
push ebx
push esi
mov ebx, eax
mov esi, dword [ebx + 0x84]
test esi, esi
je 0x4c6256
mov eax, esi
call fcn.0049e74c
test al, al
je 0x4c6256
mov eax, dword [ebx + 0x84]
call fcn.0049e3a0
push eax
call sub.user32.dll_IsWindowVisible
test eax, eax
je 0x4c6256
mov eax, dword [ebx + 0x84]
mov edx, dword [eax]
call dword [edx + 0xfc]
test al, al
je 0x4c624a
push 0
mov eax, dword [ebx + 0x84]
call fcn.0049e3a0
push eax
call sub.user32.dll_ShowWindow
xor edx, edx
mov eax, dword [ebx + 0x84]
call fcn.00495374
jmp 0x4c6256
mov cl, 1
mov edx, dword [ebx + 0x74]
mov eax, ebx
call fcn.004c6020
pop esi
pop ebx
ret

Function at 0x4e7980
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffe00
mov ebx, eax
test ebx, ebx
je 0x4e7a8a
mov ebp, ebx
mov eax, ebp
test eax, eax
je 0x4e79a1
sub eax, 4
mov eax, dword [eax]
mov edi, eax
test ebx, ebx
je 0x4e79b1
mov eax, ebp
sub eax, 0xa
movzx eax, word [eax]
jmp 0x4e79b5
mov ax, 2
cmp ax, 1
jne 0x4e7a2e
test ebx, ebx
je 0x4e79c9
mov eax, ebp
sub eax, 0xc
movzx eax, word [eax]
jmp 0x4e79d1
mov eax, dword [0x5b1c6c]
movzx eax, word [eax]
push 0
push 0
push edi
push ebx
push 0
movzx eax, ax
push eax
call sub.kernel32.dll_MultiByteToWideChar_1
mov edi, eax
cmp edi, 0x100
jle 0x4e79f9
mov eax, edi
add eax, eax
call fcn.004044a0
mov esi, eax
jmp 0x4e79fb
mov esi, esp
test ebx, ebx
je 0x4e7a09
mov eax, ebp
sub eax, 0xc
movzx edx, word [eax]
jmp 0x4e7a12
mov edx, dword [0x5b1c6c]
movzx edx, word [edx]
mov eax, ebp
test eax, eax
je 0x4e7a1d
sub eax, 4
mov eax, dword [eax]
push edi
push esi
push eax
push ebx
push 0
movzx eax, dx
push eax
call sub.kernel32.dll_MultiByteToWideChar_1
jmp 0x4e7a52
cmp edi, 0x100
jle 0x4e7a43
mov eax, edi
add eax, eax
call fcn.004044a0
mov esi, eax
jmp 0x4e7a45
mov esi, esp
mov ecx, edi
add ecx, ecx
mov edx, esi
mov eax, ebx
call fcn.00404664
push edi
push esi
call sub.user32.dll_CharUpperBuffW
xor ebx, ebx
mov eax, edi
dec eax
test eax, eax
jl 0x4e7a7b
inc eax
xor edx, edx
mov ecx, ebx
shl ecx, 5
shr ebx, 0x1b
or ecx, ebx
mov ebx, ecx
movzx ecx, word [esi + edx*2]
xor ebx, ecx
inc edx
dec eax
jne 0x4e7a65
mov eax, esp
cmp esi, eax
je 0x4e7a8c
mov eax, esi
call fcn.004044bc
jmp 0x4e7a8c
xor ebx, ebx
mov eax, ebx
add esp, 0x200
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x4fd134
Capabilities:
Check os version

Disassembly:
add esp, 0xfffffeec
mov dword [esp], 0x114
push esp
call sub.kernel32.dll_GetVersionExW
cmp dword [esp + 0x10], 2
jne 0x4fd159
cmp dword [esp + 4], 5
jb 0x4fd159
mov al, 1
jmp 0x4fd15b
xor eax, eax
add esp, 0x114
ret
Function at 0x59cb38
Capabilities:
Hash data with md5

Disassembly:
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
xor edx, edx
mov dword [eax + 0x10], edx
xor edx, edx
mov dword [eax + 0x14], edx
add eax, 0x18
xor ecx, ecx
mov edx, 0x40
call fcn.00404e1c
ret

Function at 0x59ced8
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 0x10
add esp, 0xfffff004
push eax
dec eax
jne 0x59cee1
mov eax, dword [ebp - 4]
add esp, 0xfffffdb8
push ebx
push esi
mov ebx, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00407510
xor eax, eax
push ebp
push 0x59cfbb
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x5b1d48]
mov byte [eax], 0
mov dword [ebx], 0xffffffff
mov edx, dword [ebp - 4]
lea eax, [ebp - 0x258]
call fcn.00404bc8
mov edx, 1
lea eax, [ebp - 0x258]
call fcn.00404fc0
call fcn.00404644
test eax, eax
jne 0x59cf98
lea eax, [ebp - 8]
push eax
lea edx, [ebp - 0x10249]
mov ecx, 0xfff1
lea eax, [ebp - 0x258]
call fcn.00404d18
movzx edx, word [ebp - 8]
test dx, dx
jbe 0x59cf92
lea eax, [ebp - 0x10249]
movzx ecx, byte [eax]
mov esi, dword [ebx]
and esi, 0xff
xor ecx, esi
mov ecx, dword [ecx*4 + 0x5b0fe8]
mov esi, dword [ebx]
shr esi, 8
xor ecx, esi
mov dword [ebx], ecx
inc eax
dec dx
jne 0x59cf6f
cmp dword [ebp - 8], 0
jne 0x59cf46
lea eax, [ebp - 0x258]
call fcn.00404d38
not dword [ebx]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x59cfc2
lea eax, [ebp - 4]
call fcn.00407518
ret
Function at 0x4017c0
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x406068]
test esi, esi
jle 0x4018e0
mov eax, dword [0x40606c]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp ebx, edx
jb 0x4017f4
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x401877
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x4017e0
mov dword [esp], ebx
call dbg.__mingw_GetSectionForAddress
mov edi, eax
test eax, eax
je 0x401907
mov eax, dword [0x40606c]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call dbg._GetPEImageBase
mov edx, dword [0x40606c]
add eax, dword [edi + 0xc]
mov dword [edx + ebx + 0xc], eax
lea edx, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x4018e7
mov eax, dword [esp + 0x28]
lea edx, [eax - 4]
and edx, 0xfffffffb
je 0x401870
lea edx, [eax - 0x40]
and edx, 0xffffffbf
jne 0x401880
add dword [0x406068], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
cmp eax, 2
mov edx, 4
mov eax, 0x40
mov ecx, dword [esp + 0x20]
cmove eax, edx
mov edx, dword [esp + 0x14]
add ebx, dword [0x40606c]
mov dword [ebx + 8], ecx
mov dword [ebx + 4], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x401870
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call dbg.__report_error
lea esi, cs:[esi]
nop
xor esi, esi
jmp 0x4017fe
mov eax, dword [0x40606c]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call dbg.__report_error
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call dbg.__report_error
lea esi, cs:[esi]
nop

Function at 0x401e20
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x406084
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x40607c]
sub esp, 4
test ebx, ebx
je 0x401e75
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
mov esi, eax
sub esp, 4
call edi
test esi, esi
je 0x401e6e
test eax, eax
jne 0x401e6e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x401e50
mov dword [esp], 0x406084
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x4021b0
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x400000], 0x5a4d
jne 0x4021d5
mov ecx, dword [0x40003c]
cmp dword [ecx + 0x400000], 0x4550
lea edx, [ecx + 0x400000]
je 0x4021e0
ret
cmp word [ecx + 0x400018], 0x10b
jne 0x4021d5
push esi
movzx eax, word [ecx + 0x400014]
push ebx
movzx esi, word [ecx + 0x400006]
mov ebx, dword [esp + 0xc]
lea eax, [edx + eax + 0x18]
sub ebx, 0x400000
test si, si
je 0x402228
xor ecx, ecx
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x40221e
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x40222a
add ecx, 1
add eax, 0x28
cmp esi, ecx
jne 0x402210
xor eax, eax
pop ebx
pop esi
ret

Function at 0x402590
Capabilities:
Hide graphical window

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push esi
push ebx
push ecx
sub esp, 0x3c
call dbg.__main
call dword [sym.imp.KERNEL32.dll_GetConsoleWindow]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.USER32.dll_ShowWindow]
sub esp, 8
mov dword [esp], str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
sub esp, 4
test eax, eax
je 0x402686
mov dword [esp], eax
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
mov dword [esp + 4], str.RtlAdjustPrivilege
call esi
lea edx, [ebp - 0x1d]
sub esp, 8
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0x13
call eax
sub esp, 0x10
test eax, eax
jne 0x402675
mov dword [esp + 4], str.NtRaiseHardError
mov dword [esp], ebx
call esi
sub esp, 8
mov esi, eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [ebp - 0x1c]
sub esp, 4
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 6
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0xc0000002
call esi
sub esp, 0x18
lea esp, [ebp - 0xc]
pop ecx
pop ebx
pop esi
pop ebp
lea esp, [ecx - 4]
ret
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push eax
mov eax, 5
jmp 0x40266a
xor edx, edx
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, 0xa
push ecx
jmp 0x40266a
Function at 0x10003580
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
mov eax, dword [0x1006b05c]
xor eax, esp
mov dword [esp + 8], eax
push ebx
push esi
push edi
push 0
push 0
push 0
push 0
mov edi, ecx
call fcn.10003500
add esp, 0x10
test eax, eax
jne 0x100035c1
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 8]
xor ecx, esp
call fcn.100309c2
mov esp, ebp
pop ebp
ret
jns 0x100035e1
call fcn.10037f7b
cmp dword [eax], 9
jne 0x100035e1
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 8]
xor ecx, esp
call fcn.100309c2
mov esp, ebp
pop ebp
ret
mov ebx, dword [sym.imp.WS2_32.dll_recv]
lea eax, [esp + 0x13]
nop dword [eax + eax]
push 2
push 1
push eax
push edi
call ebx
mov esi, eax
test esi, esi
jns 0x1000360e
call fcn.10037f7b
cmp dword [eax], 4
lea eax, [esp + 0x13]
je 0x100035f0
test esi, esi
mov ecx, dword [esp + 0x14]
setg al
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.100309c2
mov esp, ebp
pop ebp
ret
Function at 0x100039a0
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40c
mov eax, dword [0x1006b05c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, ecx
mov dword [ebp - 0x40c], eax
push edi
mov edi, edx
movzx eax, word [esi]
cmp eax, 2
je 0x100039d3
cmp eax, 0x17
jne 0x10003a4f
movzx eax, word [esi + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
push 0x401
mov dword [ebx], eax
lea eax, [ebp - 0x408]
push 0
push eax
call fcn.100329f0
add esp, 0xc
lea eax, [ebp - 0x408]
push 2
push 0
push 0
push 0x401
push eax
push edi
push esi
call dword [sym.imp.WS2_32.dll_getnameinfo]
test eax, eax
jne 0x10003a4f
lea edx, [ebp - 0x408]
lea esi, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x10003a20
mov ecx, dword [ebp - 0x40c]
lea eax, [ebp - 0x408]
sub edx, esi
push edx
push eax
call fcn.10010670
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100309c2
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100309c2
mov esp, ebp
pop ebp
ret

Function at 0x10004a90
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x11c
mov eax, dword [0x1006b05c]
xor eax, esp
mov dword [esp + 0x118], eax
mov eax, dword [ecx + 0x24]
mov edx, dword [ecx + 0x18]
push ebx
mov ebx, dword [sym.imp.WS2_32.dll_select]
push esi
mov esi, dword [ecx + 0x20]
mov dword [esp + 0x10], eax
mov eax, dword [ecx + 0x1c]
push edi
mov edi, dword [ecx + 4]
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], ecx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], 1
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], esi
lea eax, [esp + 0x10]
push eax
push 0
lea eax, [esp + 0x20]
push eax
push 0
lea eax, [edi + 1]
push eax
call ebx
mov esi, eax
test esi, esi
jns 0x10004b08
call fcn.10037f7b
cmp dword [eax], 4
je 0x10004ae2
test esi, esi
jle 0x10004b31
mov ecx, dword [esp + 0xc]
mov ecx, dword [ecx + 4]
call fcn.10003580
test al, al
je 0x10004b31
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x118]
xor ecx, esp
call fcn.100309c2
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x124]
xor al, al
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.100309c2
mov esp, ebp
pop ebp
ret
Function at 0x10004b50
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov edx, dword [ebp + 8]
mov eax, closesocket
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov ebx, ecx
cmp edi, eax
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], edx
cmova edi, eax
mov eax, dword [ebx + 0x34]
mov esi, dword [ebx + 0x38]
mov dword [ebp + 0xc], edi
cmp eax, esi
jae 0x10004bbd
mov ecx, dword [ebx + 0x28]
sub esi, eax
cmp edi, esi
ja 0x10004ba2
push edi
add eax, ecx
push eax
push edx
call fcn.10032470
add esp, 0xc
mov eax, edi
add dword [ebx + 0x34], edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push esi
add ecx, eax
push ecx
push edx
call fcn.10032470
add esp, 0xc
mov eax, esi
add dword [ebx + 0x34], esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebx]
mov eax, dword [eax + 4]
call eax
test al, al
jne 0x10004bd4
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebx + 4]
mov dword [ebx + 0x34], 0
mov dword [ebx + 0x38], 0
mov dword [ebp - 8], eax
cmp edi, 0x1000
jae 0x10004c5f
mov eax, dword [ebx + 0x28]
mov ebx, eax
mov edi, dword [ebp - 8]
push 0
push 0x1000
push ebx
push edi
call dword [sym.imp.WS2_32.dll_recv]
mov esi, eax
test esi, esi
jns 0x10004c19
call fcn.10037f7b
cmp dword [eax], 4
je 0x10004bf8
test esi, esi
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp - 0x10]
jle 0x10004c80
mov eax, dword [ebx + 0x28]
cmp esi, edi
jg 0x10004c41
mov ebx, dword [ebp - 4]
push esi
push eax
push ebx
call fcn.10032470
add esp, 0xc
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push edi
push eax
push dword [ebp - 4]
call fcn.10032470
add esp, 0xc
mov dword [ebx + 0x34], edi
mov eax, edi
mov dword [ebx + 0x38], esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ebx, dword [ebp - 4]
push 0
push edi
push ebx
push eax
call dword [sym.imp.WS2_32.dll_recv]
mov esi, eax
test esi, esi
jns 0x10004c80
call fcn.10037f7b
cmp dword [eax], 4
mov eax, dword [ebp - 8]
je 0x10004c62
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8

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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x90
mov eax, dword [0x1006b05c]
xor eax, esp
mov dword [esp + 0x8c], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [esp + 8]
push edi
mov edi, dword [ebp + 0xc]
push eax
lea eax, [esp + 0x14]
mov dword [esp + 0x10], 0x80
push eax
push dword [ecx + 4]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x10004db3
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0x10]
push edi
push esi
call fcn.100039a0
add esp, 8
mov ecx, dword [esp + 0x94]
pop edi
pop esi
xor ecx, esp
call fcn.100309c2
mov esp, ebp
pop ebp
ret 8