joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40161d
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push edi
mov edi, dword [esi + 0x24]
mov dword [ebp - 0xc], edi
jmp 0x401630
mov edi, dword [ebp - 0xc]
mov ecx, dword [esi + 0x64]
mov eax, dword [esi + 0x34]
mov edx, dword [esi + 0x6c]
sub eax, ecx
sub eax, edx
mov dword [ebp - 8], eax
jne 0x40164f
test ecx, ecx
jne 0x40165d
test edx, edx
jne 0x40165d
mov dword [ebp - 8], edi
jmp 0x4016c7
cmp eax, 0xffffffff
jne 0x40165d
mov dword [ebp - 8], 0xfffffffe
jmp 0x4016c7
mov eax, dword [esi + 0x24]
lea eax, [edi + eax - 0x106]
cmp ecx, eax
jb 0x4016c7
mov eax, dword [esi + 0x30]
push edi
lea ecx, [eax + edi]
push ecx
push eax
call fcn.0045da90
mov ecx, dword [esi + 0x44]
mov eax, dword [esi + 0x3c]
sub dword [esi + 0x68], edi
sub dword [esi + 0x64], edi
add esp, 0xc
sub dword [esi + 0x54], edi
lea eax, [eax + ecx*2]
dec eax
dec eax
movzx edx, word [eax]
mov ebx, edx
sub ebx, edi
cmp edx, edi
sbb edx, edx
not edx
and edx, ebx
dec ecx
mov word [eax], dx
jne 0x40168e
mov eax, dword [esi + 0x38]
mov edx, edi
lea eax, [eax + edi*2]
dec eax
dec eax
movzx ecx, word [eax]
mov ebx, ecx
sub ebx, edi
cmp ecx, edi
sbb ecx, ecx
not ecx
and ecx, ebx
dec edx
mov word [eax], cx
jne 0x4016ad
add dword [ebp - 8], edi
mov edi, dword [esi]
cmp dword [edi + 4], 0
je 0x40176d
mov ebx, dword [esi + 0x6c]
add ebx, dword [esi + 0x64]
mov eax, dword [edi + 4]
mov ecx, dword [ebp - 8]
add ebx, dword [esi + 0x30]
cmp eax, ecx
mov dword [ebp - 4], eax
jbe 0x4016ec
mov dword [ebp - 4], ecx
cmp dword [ebp - 4], 0
jne 0x4016f6
xor eax, eax
jmp 0x40172e
sub eax, dword [ebp - 4]
mov dword [edi + 4], eax
mov eax, dword [edi + 0x1c]
cmp dword [eax + 0x18], 0
jne 0x401718
push dword [ebp - 4]
push dword [edi]
push dword [edi + 0x30]
call fcn.00402618
add esp, 0xc
mov dword [edi + 0x30], eax
push dword [ebp - 4]
push dword [edi]
push ebx
call fcn.0045da90
mov eax, dword [ebp - 4]
add dword [edi], eax
add esp, 0xc
add dword [edi + 8], eax
add dword [esi + 0x6c], eax
mov edi, dword [esi + 0x6c]
cmp edi, 3
jb 0x401759
mov eax, dword [esi + 0x64]
mov ecx, dword [esi + 0x30]
lea edx, [eax + ecx]
movzx eax, byte [edx]
mov ecx, dword [esi + 0x50]
mov dword [esi + 0x40], eax
shl eax, cl
movzx ecx, byte [edx + 1]
xor eax, ecx
and eax, dword [esi + 0x4c]
mov dword [esi + 0x40], eax
cmp edi, 0x106
jae 0x40176d
mov eax, dword [esi]
cmp dword [eax + 4], 0
jne 0x40162d
pop edi
pop ebx
leave
ret

Function at 0x4073b0
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x10
mov eax, dword [0x51a744]
xor eax, esp
mov dword [esp + 0xc], eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4073f5
xorps xmm0, xmm0
movq qword [esp + 0xc], xmm0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [esp + 0xc], esi
call fcn.00458e30
mov dword [esp + 0x10], eax
test esi, esi
jne 0x407408
mov ecx, dword [esp + 0x14]
mov eax, edi
pop edi
pop esi
xor ecx, esp
call fcn.0045a560
mov esp, ebp
pop ebp
ret
mov edx, 0x501b08
lea ecx, [esp + 0xc]
call fcn.00407250
int3
Function at 0x407420
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push dword [0x523508]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, dword [ebp + 8]
test eax, eax
je 0x407462
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x407462
mov eax, dword [ecx]
test eax, eax
je 0x407462
mov dword [ecx], 0
mov dl, byte [eax]
movzx ecx, dl
cmp ecx, ebx
jb 0x407459
mov byte [eax + ebx], dl
pop ebx
pop ebp
ret
push eax
call fcn.0045a55b
add esp, 4
lea eax, [ebx + 1]
push eax
call fcn.0045a79c
add esp, 4
mov ecx, eax
cmp ebx, 0xff
ja 0x407483
movzx eax, bl
mov byte [ecx + ebx], al
mov eax, ecx
pop ebx
pop ebp
ret
xor eax, eax
mov byte [ecx + ebx], al
mov eax, ecx
pop ebx
pop ebp
ret

Function at 0x407490
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push dword [0x523508]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4074a8
mov edx, dword [eax + 4]
jmp 0x4074aa
xor edx, edx
mov eax, dword [ebp + 0xc]
cmp eax, 0xff
ja 0x4074c9
test edx, edx
je 0x4074c9
cmp dword [edx], 0
jne 0x4074c9
mov ecx, dword [ebp + 8]
mov al, byte [ecx + eax]
mov byte [ecx], al
mov dword [edx], ecx
pop ebp
ret
push dword [ebp + 8]
call fcn.0045a55b
add esp, 4
pop ebp
ret

Function at 0x4077c0
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x51a744]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
push 0xffffffffffffffff
push 0
mov eax, dword [esi + 8]
mov dword [ebp - 0xc], eax
mov eax, dword [esi + 4]
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0x523138
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
push 0
push dword [esi + 4]
test eax, eax
je 0x407823
call dword [sym.imp.KERNEL32.dll_TerminateThread]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045a560
mov esp, ebp
pop ebp
ret
push fcn.00407a50
call dword [sym.imp.KERNEL32.dll_QueueUserAPC]
push 0xffffffffffffffff
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0045a560
mov esp, ebp
pop ebp
ret
Function at 0x407850
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
mov eax, dword [0x51a744]
xor eax, esp
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push 0
push 0
push 1
mov esi, ecx
mov dword [esp + 0x20], eax
push 0
mov dword [esp + 0x20], esi
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov edi, eax
mov dword [ebx + 4], edi
test edi, edi
jne 0x4078c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebx]
mov ecx, ebx
push 1
mov esi, eax
call dword [edx]
xorps xmm0, xmm0
movq qword [esp + 0x18], xmm0
mov dword [esp + 0x18], esi
call fcn.00458e30
mov dword [esp + 0x1c], eax
test esi, esi
jne 0x4079a5
mov esi, dword [esp + 0x10]
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esi + 8], eax
mov dword [ebx + 8], eax
cmp dword [esi + 8], 0
jne 0x40790c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebx]
mov ecx, ebx
push 1
mov esi, eax
call dword [edx]
xorps xmm0, xmm0
movq qword [esp + 0x18], xmm0
mov dword [esp + 0x18], esi
call fcn.00458e30
mov dword [esp + 0x1c], eax
test esi, esi
jne 0x4079b3
mov esi, dword [esp + 0x10]
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 0
push eax
push 0
push ebx
push 0x4079d0
push dword [esp + 0x24]
push 0
call fcn.0045af74
add esp, 0x18
mov dword [esi + 4], eax
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x407981
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebx]
mov ecx, ebx
push 1
mov dword [esp + 0x18], eax
call dword [edx]
test edi, edi
je 0x407955
push edi
call esi
mov eax, dword [esp + 0x10]
mov eax, dword [eax + 8]
test eax, eax
je 0x407963
push eax
call esi
mov ebx, dword [esp + 0x14]
xorps xmm0, xmm0
movq qword [esp + 0x18], xmm0
mov dword [esp + 0x18], ebx
call fcn.00458e30
mov dword [esp + 0x1c], eax
test ebx, ebx
jne 0x4079c1
test edi, edi
je 0x407991
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push edi
call esi
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0045a560
mov esp, ebp
pop ebp
ret 8
mov edx, str.thread.entry_event
lea ecx, [esp + 0x18]
call fcn.00407250
mov edx, str.thread.exit_event
lea ecx, [esp + 0x18]
call fcn.00407250
mov edx, str.thread
lea ecx, [esp + 0x18]
call fcn.00407250
int3
Function at 0x407ba0
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e268f
mov eax, dword fs:[0]
push eax
sub esp, 0x14
mov eax, dword [0x51a744]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov dword [edi + 4], 0
mov dword [edi + 8], 0
mov dword [ebp - 0x1c], edi
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], 0
mov dword [ebp - 4], 0
mov dword [edi], vtable.boost::asio::detail::win_iocp_io_service.0
mov dword [edi + 0x14], 0
mov dword [edi + 0x18], 0
mov dword [edi + 0x1c], 0
mov dword [edi + 0x20], 0
mov dword [edi + 0x24], 0
call fcn.00408670
mov dword [edi + 0x28], eax
mov dword [edi + 0x2c], 0
mov dword [edi + 0x30], 0
mov byte [ebp - 4], 3
lea ecx, [edi + 0x38]
mov dword [edi + 0x34], 0
call fcn.004074f0
xorps xmm0, xmm0
mov esi, eax
movq qword [ebp - 0x18], xmm0
call fcn.00458e30
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], eax
test esi, esi
je 0x407c6d
mov edx, str.mutex
lea ecx, [ebp - 0x18]
call fcn.00407250
mov dword [edi + 0x50], 0
mov dword [edi + 0x54], 0
mov dword [edi + 0x58], 0
or eax, 0xffffffff
mov byte [ebp - 4], 5
cmp ebx, 0xffffffff
cmovb eax, ebx
push eax
push 0
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
mov dword [edi + 0x14], eax
test eax, eax
jne 0x407ccf
xorps xmm0, xmm0
movq qword [ebp - 0x18], xmm0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0x18], esi
call fcn.00458e30
mov dword [ebp - 0x14], eax
test esi, esi
je 0x407ccf
mov edx, str.iocp
lea ecx, [ebp - 0x18]
call fcn.00407250
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0045a560
mov esp, ebp
pop ebp
ret 8
Function at 0x407fb0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e2750
mov eax, dword fs:[0]
push eax
sub esp, 0x18
mov eax, dword [0x51a744]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov ebx, dword [ebp + 8]
lea eax, [edi + 0x18]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
test eax, eax
jne 0x40800c
mov ecx, edi
call fcn.004080d0
call fcn.00458e30
mov dword [ebx + 4], eax
xor eax, eax
mov dword [ebx], 0
jmp 0x408098
mov dword [ebp - 0x18], 0
mov dword [ebp - 4], 0
lea eax, [ebp - 0x18]
push dword [0x523508]
xorps xmm0, xmm0
mov dword [ebp - 0x1c], 0
movq qword [ebp - 0x24], xmm0
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x20], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x24]
push eax
push dword [0x523508]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push ebx
push ecx
mov ecx, edi
mov byte [ebp - 4], 1
xor esi, esi
call fcn.004083f0
test eax, eax
je 0x408077
cmp esi, 0xffffffff
je 0x40806a
inc esi
push ebx
push ecx
mov ecx, edi
call fcn.004083f0
test eax, eax
jne 0x408064
push dword [ebp - 0x1c]
push dword [0x523508]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, dword [ebp - 0x18]
test ecx, ecx
je 0x408096
push ecx
call fcn.0045a55b
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0045a560
mov esp, ebp
pop ebp
ret 4
Function at 0x408cb0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x51a744]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov eax, ecx
mov esi, edx
xor ebx, ebx
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], eax
push edi
mov edi, dword [ebp + 0xc]
cmp eax, 0xffffffff
je 0x408dbf
cmp byte [ebp + 8], bl
je 0x408d2b
test byte [esi], 8
je 0x408d2b
xor eax, eax
mov dword [ebp - 8], eax
call fcn.00458e30
or byte [esi], 8
push ebx
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov ebx, dword [ebp - 0xc]
lea eax, [ebp - 8]
push 4
push eax
push 0x80
push 0xffff
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
mov esi, eax
call fcn.00458e30
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test esi, esi
jne 0x408d2d
call fcn.00458e30
jmp 0x408d2d
mov ebx, eax
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov ebx, eax
call fcn.00458e30
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [edi], eax
mov dword [edi + 4], esi
test ebx, ebx
je 0x408dbf
call fcn.00458e30
cmp dword [edi + 4], eax
jne 0x408d66
cmp dword [edi], 0x2733
je 0x408d78
call fcn.00458e30
cmp dword [edi + 4], eax
jne 0x408dbb
cmp dword [edi], 0x4d5
jne 0x408dbb
mov ebx, dword [ebp - 0xc]
lea eax, [ebp - 8]
push eax
push 0x8004667e
push ebx
mov dword [ebp - 8], 0
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov eax, dword [ebp - 0x10]
push 0
and byte [eax], 0xfc
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov ebx, eax
call fcn.00458e30
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [edi], eax
mov dword [edi + 4], esi
test ebx, ebx
jne 0x408dcd
call fcn.00458e30
mov dword [edi], 0
mov dword [edi + 4], eax
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0045a560
mov esp, ebp
pop ebp
ret

Function at 0x408de0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x51a744]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, ecx
mov dword [ebp - 0xc], edx
push edi
cmp esi, 0xffffffff
jne 0x408e21
call fcn.00458e30
mov dword [ebx], 0x2719
mov dword [ebx + 4], eax
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045a560
mov esp, ebp
pop ebp
ret
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
lea eax, [ebp - 8]
mov dword [ebp - 8], 1
push eax
push 0x8004667e
push esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov edi, eax
call fcn.00458e30
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebx], eax
mov dword [ebx + 4], esi
test edi, edi
js 0x408e0e
call fcn.00458e30
mov ecx, dword [ebp - 4]
mov dword [ebx + 4], eax
xor ecx, ebp
mov eax, dword [ebp - 0xc]
pop edi
mov dword [ebx], 0
pop esi
or byte [eax], 2
mov al, 1
pop ebx
call fcn.0045a560
mov esp, ebp
pop ebp
ret
Function at 0x408e80
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, ecx
push edi
mov edi, edx
cmp esi, 0xffffffff
jne 0x408ea9
call fcn.00458e30
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 4], eax
or eax, esi
mov dword [ecx], 0x2719
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push dword [ebp + 8]
push edi
push esi
call dword [sym.imp.WS2_32.dll_connect]
mov ebx, eax
call fcn.00458e30
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, dword [ebp + 0xc]
mov dword [edi], eax
mov dword [edi + 4], esi
test ebx, ebx
jne 0x408ee1
call fcn.00458e30
mov dword [edi], ebx
mov dword [edi + 4], eax
pop edi
pop esi
mov eax, ebx
pop ebx
pop ecx
pop ebp
ret

Function at 0x408ef0
Capabilities:
Set socket configuration

Disassembly:
push ebx
mov ebx, edx
push esi
push edi
mov esi, ecx
cmp dword [ebx], 0
jne 0x408f52
cmp esi, 0xffffffff
jne 0x408f13
call fcn.00458e30
mov dword [ebx], 0x2719
mov dword [ebx + 4], eax
pop edi
pop esi
pop ebx
ret
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 0
push 0
push 0x7010
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov edi, eax
call fcn.00458e30
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebx], eax
mov dword [ebx + 4], esi
test edi, edi
jne 0x408f52
call fcn.00458e30
mov dword [ebx], edi
mov dword [ebx + 4], eax
pop edi
pop esi
pop ebx
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x51a744]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
push 0
mov edi, edx
mov esi, ecx
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 0
push 0
lea eax, [ebp - 0xc]
mov dword [ebp - 8], 0
push eax
lea eax, [ebp - 8]
mov dword [ebp - 0xc], 0
push eax
push 1
push edi
push esi
call dword [sym.imp.WS2_32.dll_WSARecv]
mov edi, eax
call fcn.00458e30
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebx], eax
mov dword [ebx + 4], esi
cmp eax, 0x40
jne 0x4090fc
call fcn.00458e30
mov dword [ebx], 0x2746
jmp 0x40910e
cmp eax, 0x4d2
jne 0x409111
call fcn.00458e30
mov dword [ebx], 0x274d
mov dword [ebx + 4], eax
test edi, edi
je 0x409129
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045a560
mov esp, ebp
pop ebp
ret
call fcn.00458e30
mov ecx, dword [ebp - 4]
pop edi
mov dword [ebx + 4], eax
xor ecx, ebp
mov eax, dword [ebp - 8]
pop esi
mov dword [ebx], 0
pop ebx
call fcn.0045a560
mov esp, ebp
pop ebp
ret
Function at 0x409150
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x51a744]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
push 0
mov edi, edx
mov esi, ecx
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 0
push 0
push 0
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
push 1
push edi
push esi
call dword [sym.imp.WS2_32.dll_WSASend]
mov edi, eax
call fcn.00458e30
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebx], eax
mov dword [ebx + 4], esi
cmp eax, 0x40
jne 0x4091b3
call fcn.00458e30
mov dword [ebx], 0x2746
jmp 0x4091c5
cmp eax, 0x4d2
jne 0x4091c8
call fcn.00458e30
mov dword [ebx], 0x274d
mov dword [ebx + 4], eax
test edi, edi
je 0x4091e0
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045a560
mov esp, ebp
pop ebp
ret
call fcn.00458e30
mov ecx, dword [ebp - 4]
pop edi
mov dword [ebx + 4], eax
xor ecx, ebp
mov eax, dword [ebp - 8]
pop esi
mov dword [ebx], 0
pop ebx
call fcn.0045a560
mov esp, ebp
pop ebp
ret

Function at 0x409210
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x51a744]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, ecx
mov esi, edx
push 0
mov dword [ebp - 8], edi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 1
push 0
push 0
push dword [ebp + 8]
push esi
push edi
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov edi, eax
call fcn.00458e30
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebx], eax
mov dword [ebx + 4], esi
cmp edi, 0xffffffff
jne 0x409272
or eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045a560
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 8], 0x17
jne 0x409290
push 4
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
push 0x1b
push 0x29
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
call fcn.00458e30
mov ecx, dword [ebp - 4]
mov dword [ebx + 4], eax
xor ecx, ebp
mov eax, edi
mov dword [ebx], 0
pop edi
pop esi
pop ebx
call fcn.0045a560
mov esp, ebp
pop ebp
ret
Function at 0x4092c0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x51a744]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x10], ebx
push edi
mov edi, dword [ebp + 0xc]
cmp esi, 0xffffffff
jne 0x409307
call fcn.00458e30
mov dword [edi + 4], eax
or eax, esi
mov dword [edi], 0x2719
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045a560
mov esp, ebp
pop ebp
ret
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [ebx]
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
push dword [ebp - 0xc]
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
mov ecx, dword [ebp - 8]
mov ebx, eax
mov eax, dword [ebp - 0x10]
mov dword [eax], ecx
call fcn.00458e30
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [edi], eax
mov dword [edi + 4], esi
test ebx, ebx
jne 0x40934c
call fcn.00458e30
mov dword [edi], ebx
mov dword [edi + 4], eax
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0045a560
mov esp, ebp
pop ebp
ret

Function at 0x409360
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
mov esi, ecx
push edi
mov edi, edx
cmp esi, 0xffffffff
jne 0x40938c
call fcn.00458e30
mov ecx, dword [ebp + 0x10]
mov dword [ecx + 4], eax
or eax, esi
mov dword [ecx], 0x2719
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push dword [ebp + 0xc]
push 0x8004667e
push esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov dword [ebp - 4], eax
call fcn.00458e30
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, dword [ebp + 0x10]
mov dword [ebx + 4], esi
mov esi, dword [ebp - 4]
mov dword [ebx], eax
test esi, esi
js 0x4093e7
call fcn.00458e30
mov dword [ebx + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebx], 0
cmp dword [eax], 0
je 0x4093e4
or byte [edi], 1
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
and byte [edi], 0xfc
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4093f0
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
push 0
mov ebx, edx
mov dword [ebp - 4], ecx
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov edi, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
test ebx, ebx
jne 0x40945c
test ecx, ecx
jne 0x40945c
test edi, edi
jne 0x40945c
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x40947d
mov eax, 0x10624dd3
imul dword [esi + 4]
imul eax, dword [esi], 0x3e8
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
add ecx, eax
mov eax, 1
cmove ecx, eax
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
call fcn.00458e30
mov ecx, dword [ebp + 0x14]
mov dword [ecx + 4], eax
xor eax, eax
mov dword [ecx], edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x40947d
cmp dword [esi], 0
jne 0x40947d
mov eax, dword [esi + 4]
test eax, eax
jle 0x40947d
cmp eax, 0x3e8
jge 0x40947d
mov dword [esi + 4], 0x3e8
push esi
push edi
push ecx
push ebx
push dword [ebp - 4]
call dword [sym.imp.WS2_32.dll_select]
mov ebx, eax
call fcn.00458e30
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, dword [ebp + 0x14]
mov dword [edi], eax
mov dword [edi + 4], esi
test ebx, ebx
js 0x4094b3
call fcn.00458e30
mov dword [edi], 0
mov dword [edi + 4], eax
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret