joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10002e56
Capabilities:
Get common file path
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x33c
push ebx
push esi
mov ebx, 0x104
push edi
lea eax, [ebp - 0x10c]
push ebx
push eax
xor edi, edi
push dword [ebp + 8]
mov dword [ebp - 8], edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov esi, dword [sym.imp.MSVCRT.dll_strrchr]
lea eax, [ebp - 0x10c]
push 0x5c
push eax
call esi
pop ecx
test eax, eax
pop ecx
je 0x10002eb2
lea eax, [ebp - 0x10c]
push 0x5c
push eax
call esi
inc eax
push eax
lea eax, [ebp - 0x210]
push eax
call sub.MSVCRT.dll_strcpy
add esp, 0x10
jmp 0x10002ec7
lea eax, [ebp - 0x10c]
push eax
lea eax, [ebp - 0x210]
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
cmp dword [0x1000a1c4], 0
je 0x10002efa
mov esi, 0x1000a1c4
push dword [esi - 4]
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.MSVCRT.dll__stricmp]
pop ecx
test eax, eax
pop ecx
je 0x10002f10
add esi, 0x208
inc edi
mov dword [ebp - 8], edi
cmp dword [esi], 0
jne 0x10002ed5
imul edi, edi, 0x208
xor eax, eax
cmp dword [edi + 0x1000a1c4], eax
setne al
pop edi
pop esi
pop ebx
leave
ret
lea eax, [ebp - 0x10c]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [ebp - 0x10c]
push eax
call sub.MSVCRT.dll_strlen
cmp byte [ebp + eax - 0x10d], 0x5c
pop ecx
je 0x10002f48
lea eax, [ebp - 0x10c]
push 0x1000b3e0
push eax
call sub.MSVCRT.dll_strcat
pop ecx
pop ecx
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x10c]
push eax
call sub.MSVCRT.dll_strcat
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
pop ecx
pop ecx
lea eax, [ebp - 0x10c]
push eax
call esi
test eax, eax
mov dword [0x1000b65c], eax
jne 0x10002f8b
lea eax, [ebp - 0x10c]
push eax
call esi
test eax, eax
mov dword [0x1000b65c], eax
je 0x10003040
mov esi, edi
and dword [ebp - 4], 0
imul esi, esi, 0x208
cmp dword [esi + 0x1000a1c4], 0
jle 0x10002efa
lea ecx, [esi + 0x1000a1c8]
mov ebx, 0x1000b660
mov dword [ebp + 8], ecx
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx]
test ecx, ecx
je 0x10003022
cmp byte [ecx], 0
je 0x10003022
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
mov dword [ebx], eax
jne 0x10002fd4
mov dword [ebx], 0x10002c72
and byte [ebp - 0x33c], 0
push 0x4a
pop ecx
xor eax, eax
lea edi, [ebp - 0x33b]
push dword [ebx]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebp + 8]
push dword [eax]
lea eax, [ebp - 0x33c]
push dword [0x1000b65c]
push str._p::_s___p
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x14
lea eax, [ebp - 0x33c]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [0x1000b65c]
mov edi, dword [ebp - 8]
inc dword [ebp - 4]
add dword [ebp + 8], 4
mov ecx, dword [ebp - 4]
add ebx, 4
cmp ecx, dword [esi + 0x1000a1c4]
jl 0x10002fb2
jmp 0x10002efa
xor eax, eax
jmp 0x10002f0b
Function at 0x1000312f
Capabilities:
Encode data using add xor sub operations
Encode data using xor

Disassembly:
push esi
xor esi, esi
cmp dword [esp + 0xc], esi
mov eax, 0xf667
jbe 0x10003166
mov ecx, dword [esp + 8]
lea edx, [esi + ecx]
xor ecx, ecx
mov cl, ah
xor cl, byte [edx]
mov byte [edx], cl
movzx cx, cl
add ecx, eax
mov eax, 0x58bf
imul ecx, ecx, 0x3193
sub eax, ecx
inc esi
cmp esi, dword [esp + 0xc]
jb 0x1000313d
mov eax, esi
pop esi
ret 8

Function at 0x1000316c
Capabilities:
Encode data using add xor sub operations
Encode data using xor

Disassembly:
push esi
xor esi, esi
cmp dword [esp + 0xc], esi
mov edx, 0xf667
jbe 0x100031a8
push ebx
mov eax, dword [esp + 0xc]
xor ebx, ebx
mov bl, dh
lea ecx, [esi + eax]
mov al, byte [esi + eax]
xor bl, al
movzx ax, al
add eax, edx
mov edx, 0x58bf
imul eax, eax, 0x3193
sub edx, eax
inc esi
cmp esi, dword [esp + 0x10]
mov byte [ecx], bl
jb 0x1000317b
pop ebx
mov eax, esi
pop esi
ret 8

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

Disassembly:
mov eax, dword [esp + 0xc]
push esi
xor esi, esi
push edi
cmp dword [0x1000bbf0], esi
mov edi, dword [esp + 0xc]
not eax
jne 0x100031fc
push ebx
mov edx, 0x1000b7f0
push 8
mov ecx, esi
pop ebx
test cl, 1
je 0x100031de
shr ecx, 1
xor ecx, 0xedb88320
jmp 0x100031e0
shr ecx, 1
dec ebx
jne 0x100031cf
mov dword [edx], ecx
add edx, 4
inc esi
cmp edx, 0x1000bbf0
jb 0x100031ca
mov dword [0x1000bbf0], 1
pop ebx
mov ecx, dword [esp + 0x10]
mov edx, ecx
dec ecx
test edx, edx
je 0x10003225
inc ecx
movzx esi, byte [edi]
mov edx, eax
and edx, 0xff
xor edx, esi
shr eax, 8
mov edx, dword [edx*4 + 0x1000b7f0]
xor eax, edx
inc edi
dec ecx
jne 0x10003208
pop edi
pop esi
not eax
ret 0xc
Function at 0x100033dd
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
xor ebx, ebx
push edi
mov esi, ecx
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
call fcn.1000322c
push ebx
push 0x80
push 3
push ebx
push 3
push closesocket
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x1000341f
xor eax, eax
jmp 0x10003542
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x10003448
push eax
call sub.MFC42.DLL_operatornew
pop ecx
mov dword [ebp - 8], eax
lea ecx, [ebp - 4]
push ebx
push ecx
push dword [ebp - 4]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0xc]
lea edi, [esi + 0xa4]
push eax
lea eax, [esi + 0x64]
push edi
push eax
push dword [ebp - 4]
mov ecx, esi
push dword [ebp - 8]
call fcn.10003283
mov eax, dword [esi + 0xa8]
cmp eax, ebx
je 0x1000347c
push eax
call sub.MFC42.DLL_operatordelete
pop ecx
cmp dword [ebp + 0xc], ebx
mov dword [esi + 0xa8], ebx
mov dword [esi + 0xac], ebx
je 0x100034be
mov eax, dword [ebp - 0xc]
cmp eax, ebx
je 0x1000352e
push eax
mov dword [esi + 0xac], eax
call sub.MFC42.DLL_operatornew
push dword [esi + 0xac]
mov dword [esi + 0xa8], eax
push dword [ebp - 8]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0x10
jmp 0x1000352e
cmp dword [esi + 0x88], ebx
mov dword [ebp + 8], ebx
jbe 0x1000352e
mov eax, dword [edi]
lea ecx, [eax + ebx]
mov eax, dword [eax + ebx + 4]
test eax, eax
je 0x1000351b
cmp dword [ecx], 1
jne 0x1000351b
cmp dword [ecx + 0x10], 0
je 0x1000351b
push eax
mov dword [esi + 0xac], eax
call sub.MFC42.DLL_operatornew
push dword [esi + 0xac]
mov ecx, dword [edi]
mov dword [esi + 0xa8], eax
push dword [ecx + ebx + 0x10]
push eax
call sub.MSVCRT.dll_memcpy
mov ecx, dword [edi]
add esp, 0x10
xor eax, eax
mov dword [ecx + ebx + 0x10], eax
mov ecx, dword [edi]
mov dword [ecx + ebx + 4], eax
mov ecx, dword [edi]
mov dword [ecx + ebx], eax
inc dword [ebp + 8]
add ebx, 0x18
mov eax, dword [ebp + 8]
cmp eax, dword [esi + 0x88]
jb 0x100034c9
xor ebx, ebx
push dword [ebp - 8]
call sub.MFC42.DLL_operatordelete
xor eax, eax
cmp dword [esi + 0x88], ebx
pop ecx
setne al
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x100038e8
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
push ebx
push esi
push edi
push 0x10
pop ecx
xor eax, eax
lea edi, [ebp - 0x54]
xor ebx, ebx
rep stosd dword es:[edi], eax
lea edi, [ebp - 0x10]
mov dword [ebp - 0x14], ebx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov ax, word [ebp + 0x18]
xor esi, esi
cmp ax, 0xffff
mov dword [ebp - 4], ebx
mov dword [ebp - 0x58], 0x44
je 0x10003927
mov word [ebp - 0x28], ax
mov dword [ebp - 0x2c], 1
cmp dword [ebp + 8], ebx
je 0x10003939
push dword [ebp + 8]
call sub.MSVCRT.dll_strlen
mov esi, eax
pop ecx
inc esi
inc esi
mov edi, dword [ebp + 0xc]
cmp edi, ebx
je 0x1000394e
cmp esi, ebx
je 0x10003945
inc esi
push edi
call sub.MSVCRT.dll_strlen
pop ecx
add esi, eax
inc esi
push esi
call sub.MFC42.DLL_operatornew
push esi
xor esi, esi
mov ebx, eax
push esi
push ebx
call sub.MSVCRT.dll_memset
add esp, 0x10
cmp dword [ebp + 8], esi
je 0x10003996
cmp edi, esi
je 0x10003982
push edi
push dword [ebp + 8]
push str.__s___s
push ebx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
jmp 0x1000399f
push dword [ebp + 8]
push str.__s_
push ebx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
jmp 0x1000399f
push edi
push ebx
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x58]
push eax
push dword [ebp + 0x10]
push esi
push 0x30
push esi
push esi
push esi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x100039c7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
jmp 0x100039e9
mov edi, dword [ebp + 0x14]
cmp edi, esi
je 0x100039d7
lea esi, [ebp - 0x14]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
jmp 0x100039e7
push dword [ebp - 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x10]
call esi
xor esi, esi
cmp ebx, esi
je 0x100039f4
push ebx
call sub.MFC42.DLL_operatordelete
pop ecx
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x100039fc
Capabilities:
Create directory
Get common file path
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
push ebx
push esi
push edi
mov esi, ecx
push 0x40
xor ebx, ebx
pop ecx
xor eax, eax
lea edi, [ebp - 0x113]
mov byte [ebp - 0x114], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x40
xor eax, eax
pop ecx
lea edi, [ebp - 0x217]
mov byte [ebp - 0x218], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x114]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x10003a6f
lea eax, [ebp - 0x114]
push str.C:Temp
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
lea eax, [ebp - 0x114]
pop ecx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov edi, dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
lea eax, [ebp - 0x218]
push eax
push ebx
lea eax, [ebp - 0x114]
push str.dwl_
push eax
call edi
lea ecx, [esi + 4]
mov dword [ebp - 0x10], ecx
call fcn.10001b32
cmp dword [esi + 0x88], ebx
mov dword [ebp - 4], eax
mov dword [ebp - 8], ebx
jbe 0x10003b46
mov dword [ebp - 0xc], ebx
mov eax, dword [esi + 0xa4]
mov ecx, dword [ebp - 0xc]
add eax, ecx
cmp dword [eax + 4], ebx
je 0x10003b30
cmp dword [eax], 4
jne 0x10003b30
mov ecx, dword [ebp - 4]
push ebx
push ebx
push ebx
push dword [eax + 0x10]
call fcn.10001dbb
test eax, eax
je 0x10003b30
lea eax, [ebp - 0x218]
push eax
push ebx
lea eax, [ebp - 0x114]
push str.dwl_
push eax
call edi
mov ecx, dword [ebp - 4]
lea eax, [ebp - 0x218]
push eax
call fcn.10002065
mov ecx, dword [ebp - 4]
push 1
call fcn.10002294
test eax, eax
je 0x10003b28
push ebx
push ebx
push ebx
lea eax, [ebp - 0x218]
push ebx
push eax
call fcn.100038e8
add esp, 0x14
lea eax, [ebp - 0x218]
push 4
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
mov ecx, dword [ebp - 4]
call fcn.1000271f
inc dword [ebp - 8]
add dword [ebp - 0xc], 0x18
mov eax, dword [ebp - 8]
cmp eax, dword [esi + 0x88]
jb 0x10003aab
push dword [ebp - 4]
mov ecx, dword [ebp - 0x10]
call fcn.10001b6c
pop edi
pop esi
pop ebx
leave
ret
Function at 0x100042ab
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x190
push ebx
push esi
mov esi, ecx
push edi
xor ebx, ebx
push 0x18
or dword [esi + 0x14], 0xffffffff
lea edi, [esi + 0x30]
push ebx
push edi
mov dword [esi], 0x10007a14
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov dword [esi + 0x10], ebx
call sub.MSVCRT.dll_memset
add esp, 0xc
push edi
mov edi, dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
call edi
lea eax, [esi + 0x18]
push 0x18
push ebx
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [esi + 0x18]
push eax
call edi
push 0x63
xor eax, eax
pop ecx
lea edi, [ebp - 0x18e]
mov word [ebp - 0x190], bx
mov dword [esi + 0x48], ebx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x190]
mov dword [esi + 0x4c], ebx
push eax
push 0x202
mov dword [esi + 0x50], ebx
mov dword [esi + 0x54], ebx
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x10004338
mov dword [esi + 4], ebx
jmp 0x1000433f
mov dword [esi + 4], 1
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret

Function at 0x100043df
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
cmp esi, ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 4], ebx
je 0x10004462
cmp byte [esi], bl
je 0x10004462
push edi
push esi
call dword [sym.imp.WS2_32.dll_inet_addr]
mov edi, dword [ebp + 0xc]
cmp eax, 0xffffffff
mov dword [edi], eax
jne 0x10004450
lea eax, [ebp - 8]
push ebx
push eax
push ebx
push ebx
push 1
push esi
call sub.DNSAPI.dll_DnsQuery_A
mov ecx, dword [ebp - 8]
cmp ecx, ebx
jne 0x1000442e
inc dword [ebp - 4]
cmp dword [ebp - 4], 0xa
jbe 0x1000440f
cmp ecx, ebx
mov eax, ecx
je 0x10004450
cmp word [eax + 8], 1
je 0x10004443
mov eax, dword [eax]
cmp eax, ebx
jne 0x10004434
jmp 0x10004448
mov eax, dword [eax + 0x18]
mov dword [edi], eax
push 1
push ecx
call sub.DNSAPI.dll_DnsRecordListFree
cmp dword [edi], 0xffffffff
pop edi
jne 0x1000445d
mov dword [ebp - 0xc], 0x4bc
mov eax, dword [ebp - 0xc]
jmp 0x10004465
push 0x57
pop eax
pop esi
pop ebx
leave
ret 8
Function at 0x10004d6f
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
xor ebx, ebx
xor eax, eax
lea edi, [ebp - 7]
mov byte [ebp - 8], bl
mov word [ebp - 0x18], bx
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
lea edi, [ebp - 0x16]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [ebp + 8]
xor edi, edi
cmp eax, ebx
mov dword [ebp - 4], ecx
je 0x10004e6a
cmp byte [eax], bl
je 0x10004e6a
cmp word [ebp + 0xc], bx
je 0x10004e6a
lea edx, [ebp - 8]
push edx
push eax
call fcn.100043df
mov esi, eax
cmp esi, ebx
jne 0x10004e83
mov ecx, dword [ebp - 4]
call fcn.100049d3
mov edi, eax
cmp edi, ebx
je 0x10004e83
mov ecx, dword [ebp - 4]
push edi
call fcn.10004c9b
mov ecx, dword [ebp - 4]
push ebx
push ebx
mov esi, eax
push ebx
push ebx
push esi
call fcn.1000523b
mov eax, dword [ebp + 0x10]
cmp dword [esi + 8], ebx
mov dword [esi + 0x20], eax
mov eax, dword [ebp + 0x14]
mov dword [esi + 0x24], eax
jne 0x10004e0e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
jmp 0x10004e6d
mov eax, dword [ebp - 8]
push dword [ebp + 0xc]
mov dword [ebp - 0x14], eax
call dword [sym.imp.WS2_32.dll_htons]
push ebx
push ebx
mov word [ebp - 0x16], ax
push ebx
push ebx
lea eax, [ebp - 0x18]
push 0x10
push eax
mov word [ebp - 0x18], 2
push dword [esi + 8]
call dword [sym.imp.WS2_32.dll_WSAConnect]
cmp eax, 0xffffffff
je 0x10004e04
mov ecx, dword [ebp - 4]
push 1
push esi
call fcn.100055f0
test eax, eax
jne 0x10004e56
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x10004e0a
mov ecx, dword [ebp - 4]
push edi
call fcn.10004d0b
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, edi
jmp 0x10004e8c
push 0x57
pop esi
cmp edi, ebx
je 0x10004e83
mov ecx, dword [ebp - 4]
push edi
call fcn.10004d0b
mov ecx, dword [ebp - 4]
push edi
call fcn.10004b29
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x10004eeb
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
push edi
xor edi, edi
mov dword [ebp - 0x10], ecx
cmp dword [ebp + 8], edi
mov dword [ebp - 8], edi
mov dword [ebp - 0xc], edi
je 0x100050b3
cmp dword [ebp + 0x14], edi
jne 0x10004f15
cmp dword [ebp + 0xc], edi
je 0x100050b3
cmp dword [ebp + 0x18], edi
jne 0x10004f23
cmp dword [ebp + 0x10], edi
je 0x100050b3
cmp dword [ecx + 4], edi
je 0x100050ac
cmp dword [ecx + 8], edi
je 0x100050ac
push dword [ebp + 8]
call fcn.10004c9b
mov esi, eax
cmp esi, edi
je 0x100050b3
push ebx
jmp 0x10004f4c
xor edi, edi
cmp dword [ebp + 0xc], edi
jne 0x10004f5a
cmp dword [ebp + 0x14], edi
je 0x1000508d
cmp dword [esi + 0x2c], edi
jne 0x10004fa7
mov ebx, 0x8024
push ebx
call sub.MFC42.DLL_operatornew
mov edi, eax
push ebx
push 0
push edi
mov dword [esi + 0x2c], edi
call sub.MSVCRT.dll_memset
lea eax, [edi + 0x18]
mov dword [edi + 0x14], 2
mov dword [edi + 0x801c], eax
mov eax, 0x8000
mov dword [edi + 0x8018], eax
add esp, 0x10
add edi, 0x8020
inc dword [esi + 0x34]
inc dword [esi + 0x38]
mov dword [esi + 0x30], edi
jmp 0x10004fac
mov eax, 0x8000
mov ebx, dword [esi + 0x2c]
mov ecx, dword [ebp + 0xc]
and dword [ebx + 0x8018], 0
lea edi, [ebx + 0x8018]
test ecx, ecx
je 0x10004ff5
cmp ecx, eax
mov dword [ebp - 4], ecx
jl 0x10004fcd
mov dword [ebp - 4], eax
push dword [ebp - 4]
lea eax, [ebx + 0x18]
push dword [ebp + 0x10]
push eax
call sub.MSVCRT.dll_memcpy
mov eax, dword [ebp - 4]
add esp, 0xc
sub dword [ebp + 0xc], eax
add dword [ebp + 0x10], eax
cmp dword [ebp + 0xc], 0
mov dword [edi], eax
jne 0x1000502c
mov eax, 0x8000
mov ecx, dword [edi]
cmp ecx, eax
jae 0x1000502c
mov edx, dword [ebp + 0x14]
test edx, edx
je 0x1000502c
sub eax, ecx
mov dword [ebp - 4], edx
cmp edx, eax
jl 0x1000500e
mov dword [ebp - 4], eax
push dword [ebp - 4]
lea eax, [ecx + ebx + 0x18]
push dword [ebp + 0x18]
push eax
call sub.MSVCRT.dll_memcpy
mov eax, dword [ebp - 4]
add esp, 0xc
sub dword [ebp + 0x14], eax
add dword [ebp + 0x18], eax
add dword [edi], eax
push 0x14
push 0
push ebx
call sub.MSVCRT.dll_memset
add esp, 0xc
xor eax, eax
mov dword [ebp - 0xc], eax
push eax
push ebx
push eax
lea eax, [ebp - 0xc]
push eax
push 1
push edi
push dword [esi + 8]
call dword [sym.imp.WS2_32.dll_WSASend]
cmp eax, 0xffffffff
jne 0x1000506a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x3e5
mov dword [ebp - 8], eax
jne 0x1000508b
and dword [ebp - 8], 0
inc dword [esi + 0x40]
mov ecx, dword [ebx + 0x8020]
dec dword [esi + 0x38]
lea eax, [esi + 0x2c]
test ecx, ecx
mov dword [eax], ecx
jne 0x10004f4a
mov dword [esi + 0x30], eax
jmp 0x10004f4a
xor edi, edi
push dword [ebp + 8]
mov ecx, dword [ebp - 0x10]
call fcn.10004d0b
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
cmp dword [ebp - 8], edi
pop ebx
sete al
jmp 0x100050bd
push 0x45a
jmp 0x100050b5
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
leave
ret 0x14
Function at 0x100050c3
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
push edi
xor edi, edi
mov dword [ebp - 0x10], ecx
cmp dword [ebp + 8], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 8], edi
je 0x1000521f
cmp dword [ebp + 0xc], edi
je 0x1000521f
cmp dword [ebp + 0x10], edi
je 0x1000521f
cmp dword [ecx + 4], edi
je 0x10005218
cmp dword [ecx + 8], edi
je 0x10005218
push dword [ebp + 8]
call fcn.10004c9b
mov esi, eax
cmp esi, edi
je 0x1000521f
push ebx
jmp 0x1000511a
xor edi, edi
cmp dword [esi + 0x2c], edi
jne 0x10005164
mov ebx, 0x8024
push ebx
call sub.MFC42.DLL_operatornew
mov edi, eax
push ebx
push 0
push edi
mov dword [esi + 0x2c], edi
call sub.MSVCRT.dll_memset
lea eax, [edi + 0x18]
mov dword [edi + 0x14], 2
mov dword [edi + 0x801c], eax
mov dword [edi + 0x8018], 0x8000
add esp, 0x10
add edi, 0x8020
inc dword [esi + 0x34]
inc dword [esi + 0x38]
mov dword [esi + 0x30], edi
mov eax, dword [ebp + 0xc]
mov edi, dword [esi + 0x2c]
mov ecx, 0x8000
mov dword [ebp - 4], eax
cmp eax, ecx
jl 0x10005179
mov dword [ebp - 4], ecx
push dword [ebp - 4]
lea eax, [edi + 0x18]
push dword [ebp + 0x10]
push eax
call sub.MSVCRT.dll_memcpy
mov eax, dword [ebp - 4]
lea ebx, [edi + 0x8018]
sub dword [ebp + 0xc], eax
add dword [ebp + 0x10], eax
push 0x14
push 0
push edi
mov dword [ebx], eax
call sub.MSVCRT.dll_memset
add esp, 0x18
xor eax, eax
mov dword [ebp - 8], eax
push eax
push edi
push eax
lea eax, [ebp - 8]
push eax
push 1
push ebx
push dword [esi + 8]
call dword [sym.imp.WS2_32.dll_WSASend]
cmp eax, 0xffffffff
jne 0x100051d7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp ebx, 0x3e5
jne 0x100051fc
and dword [ebp - 0xc], 0
inc dword [esi + 0x40]
mov ecx, dword [edi + 0x8020]
dec dword [esi + 0x38]
lea eax, [esi + 0x2c]
test ecx, ecx
mov dword [eax], ecx
jne 0x100051ef
mov dword [esi + 0x30], eax
cmp dword [ebp + 0xc], 0
jne 0x10005118
mov ebx, dword [ebp - 0xc]
push dword [ebp + 8]
mov ecx, dword [ebp - 0x10]
call fcn.10004d0b
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
test ebx, ebx
sete al
pop ebx
jmp 0x10005229
push 0x45a
jmp 0x10005221
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
leave
ret 0xc

Function at 0x1000523b
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0x10]
push ebx
push esi
mov esi, dword [ebp + 8]
test edx, edx
mov ebx, ecx
jle 0x10005266
mov ecx, dword [ebp + 0x14]
test ecx, ecx
jle 0x10005266
mov ax, word [ebp + 0x18]
test ax, ax
je 0x10005266
mov dword [esi + 0x10], edx
mov dword [esi + 0x18], ecx
mov word [esi + 0xc], ax
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x10005272
mov dword [esi + 8], eax
jmp 0x1000529c
push 1
push 0
push 0
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_WSASocketA]
cmp eax, 0xffffffff
mov dword [esi + 8], eax
jne 0x10005294
and dword [esi + 8], 0
xor eax, eax
jmp 0x1000529f
push eax
mov ecx, ebx
call fcn.100052a5
push 1
pop eax
pop esi
pop ebx
pop ebp
ret 0x14
Function at 0x1000530f
Capabilities:
Create tcp socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push edi
mov edi, dword [ebp + 8]
xor esi, esi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], esi
mov eax, dword [edi + 0x18]
mov dword [ebp - 8], esi
cmp eax, esi
jne 0x1000533b
push 1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1000542b
cmp dword [ebp + 0xc], esi
jg 0x10005346
mov ecx, dword [edi + 0x10]
mov dword [ebp + 0xc], ecx
mov ecx, dword [edi + 0x1c]
add ecx, dword [edi + 0x14]
add ecx, dword [ebp + 0xc]
cmp ecx, eax
jle 0x1000535f
mov dword [ebp - 4], 0x57
jmp 0x1000541a
cmp dword [ebp + 0xc], esi
mov dword [ebp + 8], esi
jle 0x10005423
push ebx
jmp 0x10005370
xor esi, esi
push 1
push esi
push esi
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_WSASocketA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x10005403
push 0x60
call sub.MFC42.DLL_operatornew
mov esi, eax
push 0x60
push 0
push esi
call sub.MSVCRT.dll_memset
mov ecx, dword [ebp - 0xc]
add esp, 0x10
mov dword [esi + 0x14], 1
mov dword [esi + 0x18], ebx
push ebx
call fcn.100052a5
lea eax, [ebp - 8]
push esi
push eax
and dword [ebp - 8], 0
push 0x20
push 0x20
lea eax, [esi + 0x20]
push 0
push eax
push ebx
push dword [edi + 8]
call sub.MSWSOCK.dll_AcceptEx
test eax, eax
jne 0x100053ed
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x3e5
mov dword [ebp - 4], eax
jne 0x100053e6
and dword [ebp - 4], 0
jmp 0x100053ed
push esi
call sub.MFC42.DLL_operatordelete
pop ecx
inc dword [edi + 0x14]
inc dword [ebp + 8]
mov eax, dword [ebp + 8]
cmp eax, dword [ebp + 0xc]
jl 0x1000536e
xor esi, esi
jmp 0x10005414
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push 0xffffffffffffffff
mov dword [ebp - 4], eax
call dword [sym.imp.WS2_32.dll_closesocket]
cmp dword [ebp - 4], esi
pop ebx
je 0x10005423
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
cmp dword [ebp - 4], esi
sete al
pop edi
pop esi
leave
ret 8