joyce8/EMBER2024-capa huggingface dataset:
Function at 0x44cc80
Capabilities:
Persist via windows service
Query or enumerate registry value
Set registry value

Disassembly:
sub esp, 0x39c
mov eax, dword [esp + 0x3a0]
push esi
push edi
mov edi, ecx
test eax, eax
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], 0x378
je 0x44cdec
mov ecx, dword [esp + 0x3ac]
test ecx, ecx
je 0x44cdec
mov edx, dword [esp + 0x3b0]
test edx, edx
je 0x44cdec
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea edx, [esp + 8]
push edx
push 0xf003f
push 0
push ecx
push eax
call esi
test eax, eax
jne 0x44cdec
mov edx, dword [esp + 8]
lea eax, [esp + 0x10]
lea ecx, [esp + 0x2c]
push eax
push ecx
push 0
push 0
push str.PackedCatalogItem
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x44cdd0
cmp dword [esp + 0x10], 0x378
jne 0x44cdd0
cmp dword [esp + 0x158], 1
jne 0x44cdf9
cmp dword [esp + 0x17c], 2
jne 0x44cdf9
mov eax, dword [esp + 0x154]
lea ecx, [esp + 0x14]
push eax
push 0x4b317c
push ecx
call fcn.004557a2
add esp, 0xc
lea edx, [esp + 0xc]
push edx
push 0x20019
push 0
push str.SYSTEMCurrentControlSetServicesWinSock2ESPI11
push closesocket
call esi
test eax, eax
jne 0x44cdd0
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x14]
push eax
push ecx
mov ecx, edi
call fcn.0044ce30
test eax, eax
je 0x44cdd0
mov edx, dword [esp + 0x10]
push 3
push str.SYSTEMCurrentControlSetServicesWinSock2ESPI11
push closesocket
lea eax, [esp + 0x38]
push edx
lea ecx, [esp + 0x24]
push eax
push ecx
mov ecx, edi
call fcn.0044c930
test eax, eax
je 0x44cdd0
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 8]
lea eax, [esp + 0x2c]
push edx
push eax
push 3
push 0
push str.PackedCatalogItem
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x44cdf9
mov eax, dword [esp + 0xc]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x44cde1
push eax
call esi
mov eax, dword [esp + 8]
test eax, eax
je 0x44cdec
push eax
call esi
pop edi
xor eax, eax
pop esi
add esp, 0x39c
ret 0xc
mov eax, dword [esp + 0xc]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x44ce0a
push eax
call esi
mov eax, dword [esp + 8]
test eax, eax
je 0x44ce15
push eax
call esi
pop edi
mov eax, 1
pop esi
add esp, 0x39c
ret 0xc
Function at 0x44ce30
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
sub esp, 0x480
mov ecx, dword [esp + 0x484]
mov dword [esp], 0x378
test ecx, ecx
je 0x44cef1
mov eax, dword [esp + 0x488]
test eax, eax
je 0x44cef1
lea edx, [esp]
push edx
lea edx, [esp + 0x10c]
push edx
push 0
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x44cef1
cmp dword [esp], 0x378
jne 0x44cef1
lea eax, [esp + 4]
push 0x104
lea ecx, [esp + 0x10c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
je 0x44cef1
lea edx, [esp + 4]
push edx
call fcn.0044c8c0
add esp, 4
test eax, eax
je 0x44cef1
cmp dword [esp + 0x234], 1
jne 0x44cee3
cmp dword [esp + 0x258], 2
jne 0x44cee3
lea eax, [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
je 0x44cef1
push str.WSPStartup
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x44cef1
mov eax, 1
add esp, 0x480
ret 8
xor eax, eax
add esp, 0x480
ret 8

Function at 0x44cf00
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x104
push esi
mov esi, dword [esp + 0x10c]
test esi, esi
je 0x44cf5f
push esi
call fcn.0044c8c0
add esp, 4
test eax, eax
je 0x44cf5f
lea eax, [esp + 4]
push 0x104
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
je 0x44cf5f
lea ecx, [esp + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
je 0x44cf5f
push str.SetPara
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
neg eax
sbb eax, eax
pop esi
neg eax
add esp, 0x104
ret 4
xor eax, eax
pop esi
add esp, 0x104
ret 4
Function at 0x44cff0
Capabilities:
Query or enumerate registry key

Disassembly:
sub esp, 0x110
push ebx
push ebp
mov ebp, dword [esp + 0x11c]
push esi
xor esi, esi
push edi
cmp ebp, esi
mov ebx, ecx
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], esi
jne 0x44d024
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x110
ret 4
push ebp
mov ecx, ebx
call fcn.0044cf00
test eax, eax
jne 0x44d03d
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x110
ret 4
push ebp
mov ecx, ebx
call fcn.0044cf70
cmp eax, 1
je 0x44d1ca
lea eax, [esp + 0x10]
push eax
push str.SYSTEMCurrentControlSetServicesWinSock2ParametersProtocol_Catalog9Catalog_Entries
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x44d076
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x110
ret 4
mov edx, dword [esp + 0x10]
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
lea ecx, [esp + 0x1c]
push 0x104
push ecx
push esi
push edx
call edi
test eax, eax
jne 0x44d0f2
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x14]
lea ecx, [esp + 0x1c]
push eax
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x44d172
mov eax, dword [esp + 0x14]
push str.PackedCatalogItem
push eax
mov ecx, ebx
call fcn.0044ce30
mov ecx, dword [esp + 0x14]
test eax, eax
push ecx
je 0x44d189
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x1c]
inc esi
push 0x104
push edx
push esi
push eax
mov dword [esp + 0x24], 0
call edi
test eax, eax
je 0x44d092
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x1c]
xor esi, esi
push 0x104
push edx
push esi
push eax
mov dword [esp + 0x28], esi
call edi
test eax, eax
jne 0x44d140
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x20]
push ebp
push edx
push eax
mov ecx, ebx
call fcn.0044cae0
test eax, eax
je 0x44d172
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x1c]
inc esi
push 0x104
push ecx
push esi
push edx
call edi
test eax, eax
je 0x44d10e
cmp dword [esp + 0x18], 1
jb 0x44d172
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
push str.SYSTEMCurrentControlSetServicesWinSock2ESPI11
dec ecx
push closesocket
push ecx
push ebp
push str.FileName
mov ecx, ebx
call fcn.0044c9c0
cmp eax, 1
je 0x44d1bb
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x44d199
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x110
ret 4
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x14], 0
jmp 0x44d172
push ebp
mov ecx, ebx
call fcn.0044d1e0
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x110
ret 4
mov eax, dword [esp + 0x10]
test eax, eax
je 0x44d1ca
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x110
ret 4
Function at 0x44d1e0
Capabilities:
Query or enumerate registry key

Disassembly:
sub esp, 0x10c
push ebp
mov ebp, dword [esp + 0x114]
push esi
xor esi, esi
push edi
cmp ebp, esi
mov edi, ecx
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], 1
jne 0x44d212
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x10c
ret 4
push esi
mov ecx, edi
call fcn.0044cf70
test eax, eax
jne 0x44d22f
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 0x10c
ret 4
lea eax, [esp + 0xc]
push eax
push str.SYSTEMCurrentControlSetServicesWinSock2ParametersProtocol_Catalog9Catalog_Entries
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x44d256
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x10c
ret 4
mov edx, dword [esp + 0xc]
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
lea ecx, [esp + 0x18]
push 0x104
push ecx
push esi
push edx
call ebx
test eax, eax
jne 0x44d2a4
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x18]
push ebp
push eax
push ecx
mov ecx, edi
call fcn.0044cc80
test eax, eax
jne 0x44d28d
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x18]
inc esi
push 0x104
push edx
push esi
push eax
call ebx
test eax, eax
je 0x44d273
push 0
push str.SYSTEMCurrentControlSetServicesWinSock2ESPI11
push closesocket
mov ecx, edi
call fcn.0044ca50
mov eax, dword [esp + 0x10]
pop ebx
test eax, eax
je 0x44d2c7
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
add esp, 0x10c
ret 4

Function at 0x4666b5
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x4666ed
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.0046476c
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.00464744
jmp 0x4666f9
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x467da3
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x467de5
call fcn.0046d85a
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x467de5
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x467ddc
xor eax, eax
jmp 0x467ded
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.00467df3
pop edi
pop esi
pop ebx
ret 4
Function at 0x46dd8a
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x46ddb8
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x46ddd6
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.0046dcf0
jmp 0x46ddd6
mov eax, dword [esi + 0x14]
test eax, eax
je 0x46ddd6
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.0046dcf0
test edi, edi
mov eax, edi
jne 0x46ddc0
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x4052e0
Capabilities:
Initialize winsock library

Disassembly:
mov al, byte [esp + 4]
sub esp, 0x190
test al, 2
je 0x405331
lea eax, [esp]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x40530e
mov eax, 2
add esp, 0x190
ret
mov ax, word [esp]
cmp al, 2
jne 0x40531f
xor ecx, ecx
mov cl, ah
cmp cl, al
je 0x405331
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 2
add esp, 0x190
ret
call fcn.00417d30
test eax, eax
jne 0x40538d
push str.iphlpapi.dll
call fcn.00405540
add esp, 4
mov dword [0xb976a8], eax
test eax, eax
je 0x405365
push str.if_nametoindex
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x405365
mov dword [0xb976ac], eax
push 3
push 2
push 0
push 6
call fcn.004053e0
add esp, 0x10
neg eax
sbb eax, eax
push 0xb986e0
neg eax
mov dword [0xb986e8], eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
xor eax, eax
add esp, 0x190
ret

Function at 0x405540
Capabilities:
Get common file path

Disassembly:
push ecx
push edi
push str.kernel32
mov dword [esp + 8], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, eax
test edi, edi
jne 0x40555e
pop edi
pop ecx
ret
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push ebp
push esi
push str.LoadLibraryExA
push edi
call ebx
mov esi, dword [esp + 0x18]
push 0xb8a388
push esi
mov ebp, eax
call fcn.00b4c670
add esp, 8
test eax, eax
je 0x4055ad
test ebp, ebp
je 0x40559c
push 8
push 0
push esi
call ebp
pop esi
pop ebp
pop ebx
mov dword [esp + 4], eax
pop edi
pop ecx
ret
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
pop esi
pop ebp
pop ebx
mov dword [esp + 4], eax
pop edi
pop ecx
ret
test ebp, ebp
je 0x4055d1
push str.AddDllDirectory
push edi
call ebx
test eax, eax
je 0x4055d1
push 0x800
push 0
push esi
call ebp
pop esi
pop ebp
pop ebx
mov dword [esp + 4], eax
pop edi
pop ecx
ret
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edx, eax
test edx, edx
mov dword [esp + 0x18], edx
je 0x40567d
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [ecx + edx + 1]
push eax
call dword [0xb8a294]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x405673
mov ecx, dword [esp + 0x18]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x405673
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
mov dx, word [0xb8a374]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ebx
mov word [ecx + ebx], dx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, esi
mov edx, ecx
or ecx, 0xffffffff
add edx, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
test ebp, ebp
rep movsb byte es:[edi], byte [esi]
je 0x405668
push 8
push 0
push ebx
call ebp
jmp 0x40566f
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [esp + 0x10], eax
push ebx
call dword [0xb8a298]
add esp, 4
mov eax, dword [esp + 0x10]
pop esi
pop ebp
pop ebx
pop edi
pop ecx
ret
Function at 0x40e3e0
Capabilities:
Send data
Send data on socket

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x100
push ebx
push ebp
push esi
mov esi, dword [esp + 0x110]
push edi
push eax
mov edi, dword [esi + eax*4 + 0x408]
push esi
call fcn.0040e4a0
mov eax, dword [esp + 0x128]
mov ecx, dword [esp + 0x124]
add esp, 8
push 0
push eax
push ecx
push edi
call dword [sym.imp.WS2_32.dll_send]
mov ebx, dword [esp + 0x124]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebx], 0
jne 0x40e485
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, eax
cmp ebp, 0x2733
jne 0x40e456
pop edi
pop esi
mov dword [ebx], 0x51
pop ebp
xor eax, eax
pop ebx
add esp, 0x100
ret
lea edx, [esp + 0x10]
push 0x100
push edx
push ebp
call fcn.0043a720
push eax
mov eax, dword [esi]
push str.Send_failure:__s
push eax
call fcn.0040e1d0
mov ecx, dword [esi]
add esp, 0x18
mov dword [ecx + 0xdc4], ebp
mov dword [ebx], 0x37
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x100
ret

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

Disassembly:
mov eax, dword [esp + 8]
push ebx
mov ebx, dword [esp + 8]
push ebp
push esi
lea esi, [eax + 0x43]
shl esi, 4
add esi, ebx
push edi
mov ebp, dword [ebx + eax*4 + 0x408]
mov edi, dword [esi + 4]
mov ecx, dword [esi + 8]
sub edi, ecx
mov ecx, dword [ebx + 0x5a8]
test byte [ecx + 0x40], 3
je 0x40e55a
cmp dword [ebx + eax*4 + 0x420], 0x40e5a0
jne 0x40e55a
cmp dword [esi], 0
je 0x40e4e9
test edi, edi
je 0x40e55a
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push ebp
call fcn.00437050
add esp, 0x14
cmp eax, 0xffffffff
je 0x40e55a
test al, 1
je 0x40e55a
cmp dword [esi], 0
jne 0x40e52c
mov edx, dword [ebx]
mov eax, dword [edx + 0x930]
shl eax, 1
push eax
mov dword [esi + 4], eax
call dword [0xb8a294]
mov edi, dword [esi + 4]
add esp, 4
mov dword [esi], eax
xor eax, eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov eax, dword [esi]
test eax, eax
je 0x40e553
mov ebx, dword [esi + 8]
push 0
add eax, ebx
push edi
push eax
push ebp
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x40e55a
mov ecx, dword [esi + 8]
pop edi
add ecx, eax
mov dword [esi + 8], ecx
pop esi
pop ebp
pop ebx
ret
mov dword [esi + 4], 0
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x40ea00
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.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x40ea43
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
xor ecx, ecx
cmp eax, 0x2733
mov edx, dword [esp + 0x10]
sete cl
mov eax, ecx
mov dword [edx], 0
neg eax
sbb eax, eax
and eax, 0x19
add eax, 0x38
ret
mov ecx, dword [esp + 0x10]
mov dword [ecx], eax
xor eax, eax
ret
Function at 0x40eac0
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
xor edi, edi
mov eax, dword [esi + 0x5f8]
test eax, eax
je 0x40eb09
push 1
push esi
call fcn.0040e0b0
mov eax, dword [esi + 0x58c]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
push eax
mov eax, dword [esp + 0x1c]
push ecx
push edx
push eax
push esi
call dword [esi + 0x5f8]
push 0
push esi
mov edi, eax
call fcn.0040e0b0
add esp, 0x24
mov eax, edi
pop edi
pop esi
ret
mov eax, dword [esp + 0x10]
test eax, eax
jl 0x40eb49
cmp eax, 2
jg 0x40eb49
mov ecx, dword [esi + 0x588]
lea edx, [eax + eax*2 + 0xb810c8]
push ecx
push 1
push 2
push edx
call fcn.00b4c436
mov eax, dword [esi + 0x588]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
push eax
push 1
push ecx
push edx
call fcn.00b4c436
add esp, 0x20
mov eax, edi
pop edi
pop esi
ret

Function at 0x40fc90
Capabilities:
Encode data using xor
Hash data using djb2

Disassembly:
mov eax, dword [esp + 8]
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
mov edi, 0x1505
lea ebx, [esi + eax]
cmp esi, ebx
jae 0x40fcc5
mov al, byte [esi]
inc esi
push eax
call fcn.00414be0
mov edx, edi
add esp, 4
movsx ecx, al
shl edx, 5
add edx, edi
xor ecx, edx
cmp esi, ebx
mov edi, ecx
jb 0x40fca7
mov eax, edi
pop edi
pop esi
and eax, 0xff
pop ebx
ret

Function at 0x412880
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 0xc]
push eax
call fcn.00412870
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 8]
push eax
push ecx
push edx
call fcn.00b50fe2
add esp, 0x10
ret
Function at 0x412cd0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x208
push ebx
mov ebx, dword [esp + 0x210]
push ebp
push esi
mov eax, dword [ebx + 0x2f8]
push edi
cmp eax, 3
jne 0x412ea0
mov eax, dword [ebx + 0x518]
test eax, eax
jne 0x412ea0
mov eax, dword [ebx + 0x580]
test eax, eax
jne 0x412ea0
mov esi, dword [esp + 0x220]
mov ebp, dword [ebx]
lea eax, [esp + 0x10]
lea ecx, [esp + 0x98]
push eax
mov edi, 0x80
push ecx
push esi
mov dword [esp + 0x1c], edi
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x412d6c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
lea edx, [esp + 0x118]
mov esi, eax
push 0x100
push edx
push esi
call fcn.0043a720
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
push ebp
call fcn.0040e1d0
add esp, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret
mov dword [esp + 0x14], edi
mov ecx, 0x20
xor eax, eax
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x14]
lea ecx, [esp + 0x18]
push eax
push ecx
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x412dc8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
lea edx, [esp + 0x118]
mov esi, eax
push 0x100
push edx
push esi
call fcn.0043a720
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push ebp
call fcn.0040e1d0
add esp, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret
mov ecx, dword [esp + 0x10]
lea eax, [ebx + 0x3a0]
lea esi, [ebx + 0x372]
push eax
push esi
lea edx, [esp + 0xa0]
push ecx
push edx
call fcn.00412c60
add esp, 0x10
test eax, eax
jne 0x412e2e
lea eax, [esp + 0x118]
push 0x100
push eax
call fcn.00b4c653
mov ecx, dword [eax]
push ecx
call fcn.0043a720
add esp, 0xc
push eax
call fcn.00b4c653
mov edx, dword [eax]
push edx
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push ebp
call fcn.0040e1d0
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret
lea edi, [ebx + 0x2c4]
mov ecx, 0xb
rep movsd dword es:[edi], dword [esi]
mov edx, dword [esp + 0x14]
lea eax, [ebx + 0x3d4]
lea ecx, [ebx + 0x3a4]
push eax
push ecx
lea eax, [esp + 0x20]
push edx
push eax
movsw word es:[edi], word [esi]
call fcn.00412c60
add esp, 0x10
test eax, eax
jne 0x412ea0
lea ecx, [esp + 0x118]
push 0x100
push ecx
call fcn.00b4c653
mov edx, dword [eax]
push edx
call fcn.0043a720
add esp, 0xc
push eax
call fcn.00b4c653
mov eax, dword [eax]
push eax
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push ebp
call fcn.0040e1d0
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret
push ebx
call fcn.00412be0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret
Function at 0x4135b0
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0xc
mov eax, dword [0xb97790]
push esi
test eax, eax
mov dword [esp + 8], 0x4020
mov dword [esp + 4], 0
mov dword [esp + 0xc], 4
jne 0x413603
push 3
push 2
push eax
push 6
call fcn.004053e0
add esp, 0x10
test eax, eax
je 0x4135f7
mov dword [0xb97790], 2
pop esi
add esp, 0xc
ret
mov dword [0xb97790], 1
jmp 0x413608
cmp eax, 2
je 0x41364f
mov esi, dword [esp + 0x14]
lea eax, [esp + 0xc]
lea ecx, [esp + 4]
push eax
push ecx
push 0x1001
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x413637
mov edx, dword [esp + 4]
mov eax, dword [esp + 8]
cmp edx, eax
jg 0x41364f
lea eax, [esp + 8]
push 4
push eax
push 0x1001
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
pop esi
add esp, 0xc
ret
Function at 0x413ea0
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x104
mov eax, dword [esp + 0x108]
mov edx, dword [esp + 0x10c]
push esi
lea ecx, [esp + 4]
mov esi, dword [eax]
push 4
push ecx
push 1
push 6
push edx
mov dword [esp + 0x18], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x413efa
lea eax, [esp + 8]
push 0x100
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0043a720
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.0040e110
add esp, 0x18
pop esi
add esp, 0x104
ret

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

Disassembly:
mov eax, dword [esp + 4]
mov ecx, dword [eax + 0x45c]
test ecx, ecx
je 0x41408c
push eax
call fcn.004062c0
add esp, 4
test eax, eax
jne 0x4140af
ret
mov eax, dword [eax + 0x408]
cmp eax, 0xffffffff
jne 0x41409a
xor eax, eax
ret
push 2
lea ecx, [esp + 8]
push 1
push ecx
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jne 0x4140af
ret
mov eax, 1
ret

Function at 0x4151e0
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.00b4daa1
add esp, 0x18
test eax, eax
je 0x415203
cmp eax, 0xffffffff
jne 0x415205
xor eax, eax
ret