joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10040a40
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x1018a438
push eax
mov dword fs:[0], esp
sub esp, 0x28
push ebx
push esi
push edi
mov edi, ecx
cmp dword [edi + 0x80], 0
jne 0x10040a9a
mov ecx, dword [0x10206138]
test ecx, ecx
jne 0x10040a81
call fcn.1001d280
mov ecx, dword [0x10206138]
push 0
lea eax, [esp + 0x14]
push eax
mov dword [esp + 0x18], str.NT_EventLog_not_opened.
push str.log4cplus:WARN
jmp 0x10040b74
call fcn.1002b1d0
mov esi, eax
mov ecx, esi
call fcn.1002c710
mov ecx, dword [edi + 8]
mov ebx, dword [ebp + 8]
mov edx, dword [ecx]
push ebx
push esi
call dword [edx + 4]
lea eax, [esp + 0x18]
push eax
mov ecx, esi
call fcn.1000d9f0
add esi, 0x98
push esi
mov ecx, eax
mov dword [esp + 0x40], 0
call fcn.1002a7b0
lea ecx, [esp + 0x18]
mov dword [esp + 0x3c], 0xffffffff
call fcn.10007890
mov ecx, esi
call fcn.10007940
cmp eax, 0x7c5f
jbe 0x10040b02
push 0x7c5f
mov ecx, esi
call fcn.1002a750
mov ecx, esi
call fcn.1000a250
push 0
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
push eax
mov eax, dword [edi]
push 0
push 1
push dword [edi + 0x84]
mov ecx, edi
push 0x1000
push ebx
call dword [eax + 0x24]
movzx eax, ax
push eax
mov eax, dword [edi]
push ebx
mov ecx, edi
call dword [eax + 0x20]
movzx eax, ax
push eax
push dword [edi + 0x80]
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
test eax, eax
jne 0x10040b86
mov ecx, dword [0x10206138]
test ecx, ecx
jne 0x10040b60
call fcn.1001d280
mov ecx, dword [0x10206138]
push 0
lea eax, [esp + 0x14]
push eax
mov dword [esp + 0x18], str.Cannot_report_event_in_NT_EventLog.
push str.log4cplus:ERROR
push 0x1001c620
push 0x10205d70
add ecx, 4
call fcn.1001c970
mov ecx, dword [esp + 0x34]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x10040c30
Capabilities:
Persist via windows service
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x1018b648
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x88
push esi
mov esi, ecx
push edi
lea eax, [esi + 0x50]
push eax
mov edx, str.SYSTEMCurrentControlSetServicesEventLog_
lea ecx, [esp + 0x7c]
call fcn.1001c3d0
push 0x101e3f78
mov edx, eax
lea ecx, [esp + 0x68]
mov dword [esp + 0xa0], 0
call fcn.10027410
lea ecx, [esi + 0x68]
push ecx
mov edx, eax
lea ecx, [esp + 0x54]
mov byte [esp + 0xa4], 1
call fcn.10027440
add esp, 0xc
lea ecx, [esp + 0x60]
call fcn.10007890
lea ecx, [esp + 0x78]
mov byte [esp + 0x98], 4
call fcn.10007890
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x14]
push eax
push 0
push 2
push 0
push 0
push 0
lea ecx, [esp + 0x64]
mov dword [esp + 0x2c], 0
call fcn.1000a250
push eax
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
cmp dword [esp + 0x14], 1
mov edi, dword [esp + 0x10]
jne 0x10040e24
push str.NTEventLogAppender.dll
lea ecx, [esp + 0x34]
call fcn.10008180
push str.EventMessageFile
lea ecx, [esp + 0x1c]
mov byte [esp + 0x9c], 5
call fcn.10008180
mov eax, dword [esp + 0x40]
add eax, eax
push eax
lea ecx, [esp + 0x34]
call fcn.1000a250
push eax
push 1
push 0
lea ecx, [esp + 0x28]
call fcn.1000a250
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push eax
push edi
call esi
lea ecx, [esp + 0x18]
call fcn.10007890
lea ecx, [esp + 0x30]
mov byte [esp + 0x98], 4
call fcn.10007890
push str.NTEventLogAppender.dll
lea ecx, [esp + 0x34]
call fcn.10008180
push str.CategoryMessageFile
lea ecx, [esp + 0x1c]
mov byte [esp + 0x9c], 6
call fcn.10008180
mov eax, dword [esp + 0x40]
add eax, eax
push eax
lea ecx, [esp + 0x34]
call fcn.1000a250
push eax
push 1
push 0
lea ecx, [esp + 0x28]
call fcn.1000a250
push eax
push edi
call esi
lea ecx, [esp + 0x18]
call fcn.10007890
lea ecx, [esp + 0x30]
mov byte [esp + 0x98], 4
call fcn.10007890
push str.TypesSupported
lea ecx, [esp + 0x1c]
call fcn.10008180
push 4
lea eax, [esp + 0x10]
push eax
push 4
push 0
lea ecx, [esp + 0x28]
mov dword [esp + 0x1c], 7
call fcn.1000a250
push eax
push edi
call esi
lea ecx, [esp + 0x18]
call fcn.10007890
push str.CategoryCount
lea ecx, [esp + 0x1c]
call fcn.10008180
push 4
lea eax, [esp + 0x10]
push eax
push 4
push 0
lea ecx, [esp + 0x28]
mov dword [esp + 0x1c], 5
call fcn.1000a250
push eax
push edi
call esi
lea ecx, [esp + 0x18]
call fcn.10007890
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x48]
call fcn.10007890
mov ecx, dword [esp + 0x90]
pop edi
mov dword fs:[0], ecx
pop esi
add esp, 0x94
ret
Function at 0x100430a0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x1018ba4f
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
push ebx
push ebp
mov ebx, ecx
push esi
mov dword [esp + 0xc], 0
push edi
lea ecx, [ebx + 0x40]
mov dword [esp + 0x14], ebx
mov dword [ebx + 4], 0x101e5b70
call fcn.1001fe60
mov ebp, dword [esp + 0x40]
push ecx
mov dword [esp + 0x3c], 0
push ebp
mov ecx, ebx
mov dword [esp + 0x18], 1
call fcn.1002b420
mov dword [esp + 0x38], 1
mov eax, dword [ebx + 4]
mov dword [ebx], vtable.log4cplus::Win32ConsoleAppender.0
mov eax, dword [eax + 4]
lea esi, [ebx + 0x38]
mov dword [eax + ebx + 4], vtable.log4cplus::Win32ConsoleAppender.1.0
lea edi, [ebx + 0x39]
add ebx, 0x3c
push 0x101e5808
lea ecx, [esp + 0x1c]
mov byte [esi], 1
mov byte [edi], 0
mov dword [ebx], 0
call fcn.10008180
lea eax, [esp + 0x18]
push eax
push esi
mov ecx, ebp
mov byte [esp + 0x40], 2
call fcn.1003d760
lea ecx, [esp + 0x18]
mov byte [esp + 0x38], 1
call fcn.10007890
push str.logToStdErr
lea ecx, [esp + 0x1c]
call fcn.10008180
lea eax, [esp + 0x18]
push eax
push edi
mov ecx, ebp
mov byte [esp + 0x40], 3
call fcn.1003d760
lea ecx, [esp + 0x18]
mov byte [esp + 0x38], 1
call fcn.10007890
push str.TextColor
lea ecx, [esp + 0x1c]
call fcn.10008180
lea eax, [esp + 0x18]
push eax
push ebx
mov ecx, ebp
mov byte [esp + 0x40], 4
call fcn.1003dad0
lea ecx, [esp + 0x18]
call fcn.10007890
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x2c
ret 8

Function at 0x10043360
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x1018ba90
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x40
push ebx
push esi
push edi
push dword [ebp + 0x10]
lea ecx, [esp + 0x34]
push dword [ebp + 0xc]
call fcn.1000de50
lea edx, [esp + 0x30]
lea ecx, [esp + 0x18]
mov dword [esp + 0x54], 0
call fcn.1002e380
lea ecx, [esp + 0x18]
mov byte [esp + 0x54], 1
call fcn.10007940
lea ecx, [esp + 0x18]
mov edi, eax
call fcn.10007770
mov ebx, eax
xor esi, esi
push 0
lea eax, [esp + 0x14]
push eax
mov eax, edi
sub eax, esi
push eax
lea eax, [esi + ebx]
push eax
push dword [ebp + 8]
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x100433f1
add esi, dword [esp + 0x10]
cmp esi, edi
jne 0x100433c2
jmp 0x1004342c
mov ecx, dword [0x10206138]
test ecx, ecx
jne 0x10043406
call fcn.1001d280
mov ecx, dword [0x10206138]
push 0
lea eax, [esp + 0x18]
push eax
push str.log4cplus:ERROR
push 0x1001c620
push 0x10205d70
add ecx, 4
mov dword [esp + 0x28], str.Win32ConsoleAppender::write_handle__WriteFile_has_failed.
call fcn.1001c970
lea ecx, [esp + 0x18]
call fcn.10008290
lea ecx, [esp + 0x30]
call fcn.10007890
mov ecx, dword [esp + 0x4c]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x100439a0
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x1018baf5
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x50
push ebx
push ebp
mov ebp, ecx
push esi
mov dword [esp + 0xc], 0
push edi
lea ecx, [ebp + 0x64]
mov dword [esp + 0x14], ebp
mov dword [ebp + 4], 0x101e5e98
call fcn.1001fe60
mov ebx, dword [esp + 0x70]
push ecx
mov dword [esp + 0x6c], 0
push ebx
mov ecx, ebp
mov dword [esp + 0x18], 1
call fcn.1002b420
mov dword [esp + 0x68], 1
mov eax, dword [ebp + 4]
mov dword [ebp], vtable.log4cplus::Log4jUdpAppender.0
mov eax, dword [eax + 4]
mov dword [eax + ebp + 4], vtable.log4cplus::Log4jUdpAppender.1.0
mov dword [ebp + 0x3c], 0xffffffff
mov dword [ebp + 0x40], 1
mov dword [ebp + 0x44], 0
mov dword [ebp + 0x38], vtable.log4cplus::helpers::Socket.0
lea ecx, [ebp + 0x48]
mov byte [esp + 0x68], 2
call fcn.10007560
lea edi, [ebp + 0x60]
mov byte [esp + 0x68], 3
push str.localhost
lea ecx, [esp + 0x34]
mov dword [edi], 0x1388
call fcn.10008180
push str.host
lea ecx, [esp + 0x1c]
mov byte [esp + 0x6c], 4
call fcn.10008180
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x50]
push eax
mov ecx, ebx
mov byte [esp + 0x74], 5
call fcn.1003d3a0
push eax
lea ecx, [ebp + 0x48]
call fcn.10002690
lea ecx, [esp + 0x48]
call fcn.10007890
lea ecx, [esp + 0x18]
call fcn.10007890
lea ecx, [esp + 0x30]
mov byte [esp + 0x68], 3
call fcn.10007890
push str.port
lea ecx, [esp + 0x34]
call fcn.10008180
lea eax, [esp + 0x30]
push eax
push edi
mov ecx, ebx
mov byte [esp + 0x70], 6
call fcn.1003d970
lea ecx, [esp + 0x30]
mov byte [esp + 0x68], 3
call fcn.10007890
mov ecx, ebp
call fcn.10043b60
mov eax, ebp
pop edi
mov ecx, dword [esp + 0x5c]
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x5c
ret 8
Function at 0x100444a0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x1018bcc0
push eax
mov dword fs:[0], esp
sub esp, 0x1c
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x38]
lea edi, [esi + 0x38]
mov eax, dword [eax + 8]
mov ecx, edi
call eax
test al, al
jne 0x10044591
movzx edx, word [esi + 0x60]
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x18], 1
mov dword [esp + 0x1c], 0
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x30], 0
push 0
lea ecx, [esi + 0x48]
mov dword [esp + 0x18], vtable.log4cplus::helpers::Socket.0
call fcn.1003e540
add esp, 8
mov dword [esp + 0x14], eax
cmp eax, 0xffffffff
je 0x1004454b
push 4
lea ecx, [esp + 0x10]
push ecx
push 1
push 6
push eax
mov dword [esp + 0x20], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x10044556
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
call fcn.1016334f
mov dword [eax], esi
call fcn.1016334f
mov eax, dword [eax]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x10]
mov dword [esp + 0x2c], 1
cmp eax, edi
je 0x10044579
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov eax, dword [edi]
lea ecx, [esp + 0x10]
push ecx
mov ecx, edi
call dword [eax + 0x10]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x10], vtable.log4cplus::helpers::AbstractSocket.0
cmp eax, 0xffffffff
je 0x10044591
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [esp + 0x24]
pop edi
mov dword fs:[0], ecx
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x10044b6e
Capabilities:
Set socket configuration

Disassembly:
push 0xffffffffffffffff
push 0x1018bc98
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
movzx edx, word [ecx - 0x34]
push edi
mov edi, dword [esp + 0x18]
mov dword [esp + 4], 0
lea eax, [edi + 8]
mov dword [edi + 4], 0xffffffff
mov dword [eax], 1
mov dword [edi + 0xc], 0
push eax
mov dword [esp + 0x14], 0
push 0
add ecx, 0xffffffb4
mov dword [edi], vtable.log4cplus::helpers::Socket.0
call fcn.1003e540
add esp, 8
mov dword [edi + 4], eax
cmp eax, 0xffffffff
je 0x100448a1
push 4
lea ecx, [esp + 0x1c]
push ecx
push 1
push 6
push eax
mov dword [esp + 0x2c], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x100448ab
push esi
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
call fcn.1016334f
mov dword [eax], esi
pop esi
call fcn.1016334f
mov eax, dword [eax]
mov dword [edi + 0xc], eax
mov ecx, dword [esp + 8]
mov eax, edi
pop edi
mov dword fs:[0], ecx
add esp, 0x10
ret 4
sub ecx, dword [ecx - 4]
jmp 0x10044810
Function at 0x10044c90
Capabilities:
Set socket configuration

Disassembly:
push 0xffffffffffffffff
push 0x1018bcd8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push esi
push edi
mov edi, ecx
mov dword [esp + 8], edi
lea eax, [edi + 8]
mov dword [edi + 4], 0xffffffff
mov dword [eax], 1
mov dword [edi + 0xc], 0
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x14], 0
push eax
push dword [esp + 0x28]
mov dword [edi], vtable.log4cplus::helpers::Socket.0
call fcn.1003e540
add esp, 8
mov dword [edi + 4], eax
cmp eax, 0xffffffff
je 0x10044d24
cmp byte [esp + 0x24], 0
jne 0x10044d2e
push 4
lea ecx, [esp + 0x28]
push ecx
push 1
push 6
push eax
mov dword [esp + 0x38], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x10044d2e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
call fcn.1016334f
mov dword [eax], esi
call fcn.1016334f
mov eax, dword [eax]
mov dword [edi + 0xc], eax
mov ecx, dword [esp + 0xc]
mov eax, edi
pop edi
mov dword fs:[0], ecx
pop esi
add esp, 0x10
ret 0xc

Function at 0x100461b0
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x101f9e50]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x194]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x10046200
mov eax, dword [ebp - 0x194]
cmp al, 2
jne 0x100461fa
shr eax, 8
cmp al, 2
jne 0x100461fa
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1016027d
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [ebp - 4]
xor ecx, ebp
mov eax, 2
call fcn.1016027d
mov esp, ebp
pop ebp
ret
Function at 0x1004d150
Capabilities:
Encode data using xor
Hash data using djb2

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
lea edi, [esi + eax]
mov ebx, 0x1505
cmp esi, edi
jae 0x1004d186
mov al, byte [esi]
push eax
call fcn.10059bb0
movsx ecx, al
mov eax, ebx
shl eax, 5
add eax, ebx
xor ecx, eax
inc esi
add esp, 4
mov ebx, ecx
cmp esi, edi
jb 0x1004d168
pop edi
pop esi
movzx eax, bl
pop ebx
pop ebp
ret

Function at 0x1004e4a0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x1004e4be
cmp dword [esi + 0x6c], 0
je 0x1004e4be
push 2
push 3
push esi
call fcn.1005a170
add esp, 0xc
push dword [ebp + 0xc]
call fcn.1005cff0
add esp, 4
test esi, esi
je 0x1004e4de
cmp dword [esi + 0x6c], 0
je 0x1004e4de
push 3
push esi
call fcn.1005a1b0
add esp, 8
pop esi
pop ebp
ret

Function at 0x1004f080
Capabilities:
Create udp socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
cmp dword [eax + 0x358], 2
jne 0x1004f095
pop ebp
jmp fcn.1004f030
mov eax, 1
pop ebp
ret
Function at 0x10057560
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, dword [ebp + 8]
cmp dword [edi + 0x618], 0
je 0x100575a4
push esi
push 1
push edi
call fcn.100495c0
push dword [edi + 0x5a4]
mov eax, dword [edi + 0x618]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edi
call eax
push 0
push edi
mov esi, eax
call fcn.100495c0
add esp, 0x24
mov eax, esi
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp + 0xc]
cmp eax, 2
ja 0x100575da
push dword [edi + 0x5a0]
lea eax, [eax + eax*2]
push 1
add eax, 0x1018e9a0
push 2
push eax
call fcn.10161e5c
push dword [edi + 0x5a0]
push 1
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.10161e5c
add esp, 0x20
xor eax, eax
pop edi
pop ebp
ret

Function at 0x10057970
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push eax
mov esi, dword [edi + eax*4 + 0x1a8]
push edi
call fcn.10057e80
add esp, 8
push 0
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push esi
call dword [sym.imp.WS2_32.dll_send]
mov ebx, eax
mov eax, dword [ebp + 0x18]
mov dword [eax], 0
cmp ebx, 0xffffffff
jne 0x100579f4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
cmp esi, 0x2733
jne 0x100579cc
mov eax, dword [ebp + 0x18]
pop edi
pop esi
mov dword [eax], 0x51
xor eax, eax
pop ebx
pop ebp
ret
push esi
push edi
call fcn.1007efb0
push eax
push str.Send_failure:__s
push dword [edi]
call fcn.100575e0
mov eax, dword [edi]
add esp, 0x14
mov dword [eax + 0xde0], esi
mov eax, dword [ebp + 0x18]
mov dword [eax], 0x37
pop edi
pop esi
mov eax, ebx
pop ebx
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov eax, dword [ebx + 0x350]
mov edx, dword [ebx + ecx*4 + 0x1a8]
lea esi, [ecx + 0x1d]
shl esi, 4
add esi, ebx
push edi
mov edi, dword [esi + 4]
sub edi, dword [esi + 8]
test byte [eax + 0x40], 3
mov dword [ebp + 8], edx
je 0x10057f38
cmp dword [ebx + ecx*4 + 0x1c0], 0x100578c0
jne 0x10057f38
cmp dword [esi], 0
je 0x10057eca
test edi, edi
je 0x10057f38
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push edx
call fcn.100570c0
add esp, 0x14
cmp eax, 0xffffffff
je 0x10057f38
test al, 1
je 0x10057f38
cmp dword [esi], 0
jne 0x10057f1f
mov eax, dword [ebx]
mov eax, dword [eax + 0x940]
add eax, eax
push eax
mov dword [esi + 4], eax
call dword [section..data]
mov edi, dword [esi + 4]
add esp, 4
mov dword [esi], eax
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
test eax, eax
jne 0x10057f1f
pop edi
mov dword [esi + 4], eax
pop esi
pop ebx
pop ebp
ret
mov eax, dword [esi]
add eax, dword [esi + 8]
push 0
push edi
push eax
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x10057f38
add dword [esi + 8], eax
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x10058020
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
cmp dword [eax + 0x1f0], 0
je 0x10058040
push eax
call fcn.10051560
add esp, 4
test eax, eax
jne 0x10058060
xor eax, eax
pop ebp
ret
mov eax, dword [eax + 0x1a8]
cmp eax, 0xffffffff
je 0x1005803c
push 2
push 1
lea ecx, [ebp + 0xb]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jne 0x10058060
pop ebp
ret
mov eax, 1
pop ebp
ret

Function at 0x100587a0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x10202090]
mov dword [ebp - 8], 0x4020
mov dword [ebp - 4], 0
mov dword [ebp - 0xc], 4
test eax, eax
jne 0x100587f1
push 3
push 2
push eax
push 6
call fcn.1007fa50
add esp, 0x10
test eax, eax
je 0x100587e5
mov dword [0x10202090], 2
mov esp, ebp
pop ebp
ret
mov dword [0x10202090], 1
jmp 0x100587f6
cmp eax, 2
je 0x10058836
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
push 0x1001
push 0xffff
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x1005881d
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 8]
jg 0x10058836
push 4
lea eax, [ebp - 8]
push eax
push 0x1001
push 0xffff
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_setsockopt]
mov esp, ebp
pop ebp
ret

Function at 0x10058960
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
mov edi, dword [ebp + 8]
push 4
mov esi, dword [edi]
lea eax, [ebp + 8]
push eax
push 1
push 6
push dword [ebp + 0xc]
mov dword [ebp + 8], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x100589a8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.1007efb0
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.100576c0
add esp, 0x14
pop edi
pop esi
pop ebp
ret
push str.TCP_NODELAY_set_n
push esi
call fcn.100576c0
add esp, 8
pop edi
pop esi
pop ebp
ret
Function at 0x10058b10
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x101f9e50]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push edi
cmp dword [ebx + 0x90], 2
mov edi, dword [ebx]
mov dword [ebp - 0x10c], edi
je 0x10058ce9
cmp dword [ebx + 0x2a4], 0
push esi
jne 0x10058cdf
cmp dword [ebx + 0x314], 0
jne 0x10058cdf
mov esi, dword [ebp + 0xc]
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x104]
push eax
push esi
mov dword [ebp - 0x108], 0x80
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x10058bae
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebx
call fcn.1007efb0
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
push edi
call fcn.100575e0
add esp, 0x18
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1016027d
mov esp, ebp
pop ebp
ret
push 0x80
lea eax, [ebp - 0x84]
push 0
push eax
mov dword [ebp - 0x108], 0x80
call fcn.10161890
add esp, 0xc
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x84]
push eax
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x10058c17
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebx
call fcn.1007efb0
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
call fcn.100575e0
add esp, 0x18
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1016027d
mov esp, ebp
pop ebp
ret
lea eax, [ebx + 0x134]
push eax
lea esi, [ebx + 0x106]
lea eax, [ebp - 0x104]
push esi
push eax
call fcn.10058230
add esp, 0xc
test eax, eax
jne 0x10058c75
call fcn.1016334f
mov esi, eax
call fcn.1016334f
push dword [esi]
mov edi, eax
push ebx
call fcn.1007efb0
push eax
push dword [edi]
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push dword [ebp - 0x10c]
call fcn.100575e0
add esp, 0x18
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1016027d
mov esp, ebp
pop ebp
ret
lea edi, [ebx + 0x5c]
mov ecx, 0xb
rep movsd dword es:[edi], dword [esi]
lea eax, [ebx + 0x168]
push eax
lea eax, [ebx + 0x138]
push eax
lea eax, [ebp - 0x84]
push eax
movsw word es:[edi], word [esi]
call fcn.10058230
add esp, 0xc
test eax, eax
jne 0x10058cdf
call fcn.1016334f
mov esi, eax
call fcn.1016334f
push dword [esi]
mov edi, eax
push ebx
call fcn.1007efb0
push eax
push dword [edi]
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push dword [ebp - 0x10c]
call fcn.100575e0
add esp, 0x18
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1016027d
mov esp, ebp
pop ebp
ret
push ebx
call fcn.10058720
add esp, 4
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.1016027d
mov esp, ebp
pop ebp
ret
Function at 0x10059600
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x101f9e50]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
xor eax, eax
cmp dword [esi + 0xb40], eax
push edi
mov edi, dword [ebp + 0xc]
setne al
push 4
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
push 8
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x1005965d
push edi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.100576c0
add esp, 0xc
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1016027d
mov esp, ebp
pop ebp
ret
push dword [esi + 0xb44]
mov dword [ebp - 0x10], 1
call fcn.10059840
imul eax, eax, 0x3e8
push dword [esi + 0xb48]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], eax
call fcn.10059840
imul eax, eax, 0x3e8
add esp, 8
mov dword [ebp - 0x14], eax
push 0
push 0
mov dword [ebp - 8], eax
lea eax, [ebp - 0x18]
push eax
push 0
push 0
push 0xc
lea eax, [ebp - 0x10]
push eax
push 0x98000004
push edi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x100596cd
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
push esi
call fcn.100576c0
add esp, 0x10
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.1016027d
mov esp, ebp
pop ebp
ret