joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40da90
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push 0x1000
push 0
push dword [0x43e01c]
mov dword [esp + 0x14], 0x1000
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 0x10], edx
test edx, edx
je 0x40dc14
mov cl, byte [esp + 3]
push ebx
mov ebx, dword [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x28]
push esi
push edi
mov esi, edx
mov edi, edi
cmp ebp, 0xffffffff
je 0x40dade
test ebp, ebp
je 0x40db80
dec ebp
cmp dword [ebx + 4], 0
je 0x40daf7
push 1
lea eax, [esp + 0x17]
push eax
push ebx
call fcn.0040dc20
mov dword [esp + 0x14], eax
jmp 0x40db11
push 0
lea eax, [esp + 0x18]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
mov cl, byte [esp + 0x13]
cmp eax, 1
jne 0x40db80
test cl, cl
je 0x40db25
mov byte [esi], cl
inc esi
mov cl, byte [esp + 0x13]
mov eax, dword [esp + 0x18]
mov edi, esi
mov edx, dword [esp + 0x20]
dec eax
sub edi, edx
cmp edi, eax
jle 0x40db60
mov eax, dword [esp + 0x18]
add eax, 0x1000
push eax
push edx
push 8
push dword [0x43e01c]
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov cl, byte [esp + 0x13]
mov edx, eax
mov dword [esp + 0x20], edx
lea esi, [edi + edx]
test cl, cl
je 0x40db80
cmp dword [esp + 0x2c], 0
jne 0x40dad0
cmp cl, 0xd
je 0x40db87
cmp cl, 0xa
jne 0x40dad0
dec esi
jmp 0x40dbf7
cmp dword [esp + 0x2c], 0
jne 0x40dbf7
cmp cl, 0xa
jne 0x40db8f
dec esi
jmp 0x40dbf7
cmp cl, 0xd
jne 0x40dbf7
dec esi
cmp dword [ebx + 4], 0
je 0x40dbae
push 1
lea eax, [esp + 0x17]
push eax
push ebx
call fcn.0040dc20
mov dword [esp + 0x14], eax
jmp 0x40dbc4
push 0
lea eax, [esp + 0x18]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esp + 0x13], 0xa
je 0x40dbf7
cmp dword [ebx + 4], 0
je 0x40dbd6
inc dword [ebx + 0xc]
jmp 0x40dbf7
push 1
lea eax, [esp + 0x20]
mov dword [esp + 0x1c], 0xffffffff
push eax
push 0xffffffffffffffff
push dword [ebx]
mov dword [esp + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x34]
mov ecx, esi
sub ecx, dword [esp + 0x20]
pop edi
mov dword [eax], ecx
mov eax, dword [esp + 0x1c]
mov byte [esi], 0
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
xor eax, eax
add esp, 0x14
ret 0x10
Function at 0x40dc20
Capabilities:
Read file on windows

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
cmp dword [esi + 0x14], 0
jne 0x40dc41
push esi
call fcn.0040d290
mov dword [esi + 0x14], 1
mov dword [esi + 0xc], 0
mov ebx, dword [esi + 0xc]
mov edi, dword [esp + 0x18]
mov eax, dword [esi + 0x10]
cmp ebx, edi
jl 0x40dcb5
add eax, dword [esi + 4]
mov ecx, edi
sub eax, ebx
dec ecx
je 0x40dca2
dec ecx
je 0x40dc8d
sub ecx, 2
je 0x40dc7a
push edi
push eax
push dword [esp + 0x1c]
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
mov ecx, dword [eax]
mov eax, dword [esp + 0x14]
mov dword [eax], ecx
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
mov cx, word [eax]
mov eax, dword [esp + 0x14]
mov word [eax], cx
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
mov ecx, dword [esp + 0x14]
mov dl, byte [eax]
mov eax, edi
mov byte [ecx], dl
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
push ebp
mov ebp, dword [esp + 0x18]
sub eax, ebx
add eax, dword [esi + 4]
push ebx
push eax
push ebp
call sub.MSVCRT.dll_memcpy
mov eax, dword [esi + 8]
add esp, 0xc
sub edi, ebx
add ebp, ebx
push 0
cmp edi, eax
jl 0x40dcfa
lea eax, [esp + 0x18]
push eax
push edi
push ebp
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
pop ebp
pop edi
mov dword [esi + 0xc], 0
add eax, ebx
pop esi
pop ebx
ret 0xc
lea ecx, [esp + 0x18]
push ecx
push eax
push dword [esi + 4]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
cmp edi, eax
jle 0x40dd1b
mov edi, eax
push edi
push dword [esi + 4]
push ebp
call sub.MSVCRT.dll_memcpy
sub dword [esi + 0xc], edi
lea eax, [ebx + edi]
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
ret 0xc
Function at 0x40dd40
Capabilities:
Read file on windows

Disassembly:
push ecx
push edi
mov edi, dword [esp + 0xc]
mov dword [esp + 4], 0
cmp dword [edi + 4], 0
je 0x40dd67
push 1
lea eax, [esp + 0x10]
push eax
push edi
call fcn.0040dc20
mov dword [esp + 4], eax
jmp 0x40dd81
push 0
lea eax, [esp + 8]
push eax
push 1
lea eax, [esp + 0x18]
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 4]
cmp eax, 1
je 0x40dd8d
xor eax, eax
pop edi
pop ecx
ret 8
mov cl, byte [esp + 0xc]
test cl, cl
js 0x40dda9
mov eax, dword [esp + 0x10]
pop edi
mov byte [eax], cl
mov byte [eax + 1], 0
mov eax, 1
pop ecx
ret 8
mov al, cl
and al, 0xe0
push esi
cmp al, 0xc0
jne 0x40ddb9
mov esi, 2
jmp 0x40ddd5
mov al, cl
and al, 0xf0
cmp al, 0xe0
jne 0x40ddc8
mov esi, 3
jmp 0x40ddd5
mov al, cl
and al, 0xf8
cmp al, 0xf0
jne 0x40de32
mov esi, 4
mov edx, dword [esp + 0x14]
mov byte [edx], cl
cmp dword [edi + 4], 0
je 0x40de04
lea eax, [esi - 1]
push eax
lea eax, [edx + 1]
push eax
push edi
call fcn.0040dc20
mov edx, eax
lea ecx, [esi - 1]
xor eax, eax
cmp edx, ecx
setne al
dec eax
and eax, esi
pop esi
pop edi
pop ecx
ret 8
push 0
lea eax, [esp + 0xc]
push eax
lea eax, [esi - 1]
push eax
lea eax, [edx + 1]
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [esp + 8]
lea ecx, [esi - 1]
xor eax, eax
cmp edx, ecx
setne al
dec eax
and eax, esi
pop esi
pop edi
pop ecx
ret 8
mov eax, dword [esp + 0x14]
pop esi
pop edi
mov word [eax], 0x3f
mov eax, 1
pop ecx
ret 8

Function at 0x40dea8
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push edi
push dword [0x43e264]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x40df09
push esi
push dword [0x43e260]
push 8
push dword [0x43e01c]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
push edi
push dword [0x43e264]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov esi, dword [0x43e25c]
jmp 0x40def9
mov ecx, dword [esi + 0xc]
test ecx, ecx
je 0x40def7
mov eax, dword [esi + 8]
add eax, edi
push eax
call ecx
pop ecx
mov esi, dword [esi]
test esi, esi
jne 0x40dee7
push edi
push 0x40de46
call fcn.0043412b
pop esi
mov eax, dword [esp + 8]
add eax, edi
pop edi
ret 4
Function at 0x40df13
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x10]
mov ecx, esi
push edi
and ecx, 3
je 0x40df29
push 4
pop eax
sub eax, ecx
add esi, eax
mov eax, dword [0x43e260]
mov ebx, dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x40df60
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
push esi
push 8
push dword [0x43e01c]
mov dword [0x43e264], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
push dword [0x43e264]
call ebx
mov eax, dword [0x43e260]
mov edi, eax
add eax, esi
push eax
push dword [0x43e264]
mov dword [0x43e260], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push eax
push 8
push dword [0x43e01c]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ebp, eax
push ebp
push dword [0x43e264]
call ebx
mov esi, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
test esi, esi
jne 0x40dfa0
test ebx, ebx
je 0x40dfc1
push 0x14
push 0x43e25c
call fcn.0040e6f2
pop ecx
pop ecx
mov dword [eax], edi
mov dword [eax + 4], esi
mov dword [eax + 8], ebx
test esi, esi
je 0x40dfc1
lea ecx, [edi + ebp]
push ecx
call esi
pop ecx
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret 0xc

Function at 0x40e890
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x43c7a4]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 8]
sub edx, dword [ebp + 0xc]
mov dword [ebp - 4], edx
mov eax, dword [ebp + 8]
cmp dword [eax], 0
jne 0x40e8d6
mov ecx, dword [ebp - 4]
add ecx, 5
push ecx
push 0
mov edx, dword [0x43e4e0]
push edx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
jmp 0x40e8f7
mov edx, dword [ebp - 4]
add edx, 5
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
push 0
mov edx, dword [0x43e4e0]
push edx
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
add ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
call fcn.0040ed00
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + 0xc]
mov dword [ecx + 8], edx
mov esp, ebp
pop ebp
ret 8

Function at 0x40e920
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x43c7a4]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 8]
add edx, 1
mov eax, dword [ebp - 4]
mov dword [eax + 8], edx
mov esp, ebp
pop ebp
ret
Function at 0x40ebe0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x43c7a4]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx]
jb 0x40ec1e
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
mov edx, dword [ebp - 4]
add ecx, dword [edx + 8]
cmp dword [ebp + 8], ecx
ja 0x40ec1e
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
sub ecx, dword [eax]
add ecx, 1
mov eax, ecx
jmp 0x40ec20
xor eax, eax
mov esp, ebp
pop ebp
ret 4

Function at 0x40ec30
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x43c7a4]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], 0xffffffff
jne 0x40ec54
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 8]
mov dword [ebp + 0xc], edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 8]
add ecx, dword [ebp + 8]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 4]
sub eax, 4
cmp dword [ebp - 8], eax
jl 0x40eca1
mov ecx, dword [ebp - 8]
add ecx, 0x4000
mov edx, dword [ebp - 4]
mov dword [edx + 4], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 4]
add ecx, 5
push ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx]
push eax
push 0
mov ecx, dword [0x43e4e0]
push ecx
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov edx, dword [ebp - 4]
mov dword [edx], eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
add ecx, dword [ebp + 0xc]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp + 0xc]
add edx, dword [ebp + 8]
mov eax, dword [ebp - 4]
mov dword [eax + 8], edx
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret 8

Function at 0x40edb0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x43c7a4]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov eax, dword [ecx]
add eax, dword [ebp + 8]
mov esp, ebp
pop ebp
ret 4

Function at 0x40f2e0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x43c7a4]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 8]
mov dword [ecx + 8], edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
mov edx, dword [ebp - 4]
add ecx, dword [edx + 8]
mov dword [ebp - 8], ecx
mov eax, dword [ebp - 8]
mov esp, ebp
pop ebp
ret 4

Function at 0x40f6d0
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x190
lea eax, [esp]
push eax
push 0x202
call dword [sym.imp.WSOCK32.DLL_WSAStartup]
test eax, eax
jne 0x40f709
mov eax, dword [esp]
cmp al, 2
jne 0x40f703
shr eax, 8
cmp al, 2
jne 0x40f703
call fcn.0041d1a0
add esp, 0x190
ret
call dword [sym.imp.WSOCK32.DLL_WSACleanup]
mov eax, 2
add esp, 0x190
ret
Function at 0x418710
Capabilities:
Write file on windows

Disassembly:
push ebx
mov ebx, dword [esp + 8]
lea eax, [esp + 0x10]
push ebp
push eax
push dword [esp + 0x14]
lea ebp, [ebx + 0x4c4]
push 0x4000
push ebp
call fcn.00427ff0
mov eax, dword [ebx + 0xfc]
add esp, 0x10
test eax, eax
je 0x418761
cmp byte [ebx + 0x84ec], 0
jne 0x418761
push ebp
push 0x435da0
push 0x100
push eax
call fcn.00427f00
add esp, 0x10
mov byte [ebx + 0x84ec], 1
cmp byte [ebx + 0x284], 0
je 0x4187d8
push edi
mov edi, ebp
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x418770
sub edi, ecx
cmp edi, 0x3fff
jae 0x418791
mov byte [edi + ebx + 0x4c4], 0xa
inc edi
mov byte [edi + ebx + 0x4c4], al
mov eax, dword [ebx + 0x164]
test eax, eax
je 0x4187af
push dword [ebx + 0xf8]
push edi
push ebp
push 0
push ebx
call eax
add esp, 0x14
pop edi
pop ebp
pop ebx
ret
push dword [ebx + 0xf4]
push 1
push 2
push 0x435d88
call dword [sym.imp.MSVCRT.dll_fwrite]
push dword [ebx + 0xf4]
push 1
push edi
push ebp
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x20
pop edi
pop ebp
pop ebx
ret

Function at 0x4187e0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x804
push ebx
mov ebx, dword [esp + 0x80c]
test ebx, ebx
je 0x41888d
cmp byte [ebx + 0x284], 0
je 0x41888d
push edi
lea eax, [esp + 0x818]
push eax
push dword [esp + 0x818]
lea eax, [esp + 0x10]
push 0x801
push eax
call fcn.00427ff0
lea edi, [esp + 0x18]
add esp, 0x10
lea ecx, [edi + 1]
lea esp, [esp]
mov al, byte [edi]
inc edi
test al, al
jne 0x418830
mov eax, dword [ebx + 0x164]
sub edi, ecx
test eax, eax
je 0x418860
push dword [ebx + 0xf8]
lea ecx, [esp + 0xc]
push edi
push ecx
push 0
push ebx
call eax
add esp, 0x14
pop edi
pop ebx
add esp, 0x804
ret
push dword [ebx + 0xf4]
push 1
push 2
push 0x435d88
call dword [sym.imp.MSVCRT.dll_fwrite]
push dword [ebx + 0xf4]
lea eax, [esp + 0x1c]
push 1
push edi
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x20
pop edi
pop ebx
add esp, 0x804
ret

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

Disassembly:
push 0
push dword [esp + 0x10]
push dword [esp + 0x10]
push dword [esp + 0x10]
call dword [sym.imp.WSOCK32.DLL_recv]
mov ecx, eax
cmp ecx, 0xffffffff
jne 0x4189f1
call dword [sym.imp.WSOCK32.DLL_WSAGetLastError]
sub eax, 0x2733
neg eax
sbb eax, eax
and eax, 0xffffffe7
add eax, 0x51
ret
mov eax, dword [esp + 0x10]
mov dword [eax], ecx
xor eax, eax
ret

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

Disassembly:
mov eax, dword [esp + 8]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
push edi
push 0
push dword [esp + 0x20]
push dword [esp + 0x20]
push dword [ebp + eax*4 + 0x144]
call dword [sym.imp.WSOCK32.DLL_send]
mov ebx, dword [esp + 0x20]
mov edi, eax
mov dword [ebx], 0
cmp edi, 0xffffffff
jne 0x418afb
push esi
call dword [sym.imp.WSOCK32.DLL_WSAGetLastError]
mov esi, eax
cmp esi, 0x2733
jne 0x418ad1
pop esi
pop edi
pop ebp
mov dword [ebx], 0x51
xor eax, eax
pop ebx
ret
push esi
push ebp
call fcn.0042d070
push eax
push str.Send_failure:__s
push dword [ebp]
call fcn.00418710
mov eax, dword [ebp]
add esp, 0x14
mov dword [eax + 0x84f0], esi
mov eax, edi
mov dword [ebx], 0x37
pop esi
pop edi
pop ebp
pop ebx
ret
Function at 0x418c00
Capabilities:
Write file on windows

Disassembly:
push edi
mov edi, dword [esp + 8]
mov eax, dword [edi + 0x164]
test eax, eax
je 0x418c29
push dword [edi + 0xf8]
push dword [esp + 0x18]
push dword [esp + 0x18]
push dword [esp + 0x18]
push edi
call eax
add esp, 0x14
pop edi
ret
mov eax, dword [esp + 0xc]
cmp eax, 2
ja 0x418c64
push dword [edi + 0xf4]
lea eax, [eax + eax*2]
push 1
add eax, 0x435d88
push 2
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
push dword [edi + 0xf4]
push 1
push dword [esp + 0x2c]
push dword [esp + 0x2c]
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x20
xor eax, eax
pop edi
ret
Function at 0x41b840
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0xa8
mov eax, dword [0x43e2bc]
mov dword [esp], 0x4020
mov dword [esp + 4], 0
mov dword [esp + 8], 4
test eax, eax
jne 0x41b8c7
push 0x9c
push eax
lea eax, [esp + 0x14]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [esp + 0xc], 0x9c
mov dword [esp + 0x10], 6
push 3
push 2
push 0
push 0
call dword [sym.imp.KERNEL32.dll_VerSetConditionMask]
push edx
push eax
push 2
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_VerifyVersionInfoA]
test eax, eax
je 0x41b8bb
mov dword [0x43e2bc], 2
add esp, 0xa8
ret
mov dword [0x43e2bc], 1
jmp 0x41b8cc
cmp eax, 2
je 0x41b918
lea eax, [esp + 8]
push eax
lea eax, [esp + 8]
push eax
push 0x1001
push 0xffff
push dword [esp + 0xbc]
call dword [sym.imp.WSOCK32.DLL_getsockopt]
test eax, eax
jne 0x41b8fa
mov eax, dword [esp + 4]
cmp eax, dword [esp]
jg 0x41b918
push 4
lea eax, [esp + 4]
push eax
push 0x1001
push 0xffff
push dword [esp + 0xbc]
call dword [sym.imp.WSOCK32.DLL_setsockopt]
add esp, 0xa8
ret
Function at 0x41bac0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x104
push ebx
mov ebx, dword [esp + 0x10c]
push ebp
cmp dword [ebx + 0x7c], 2
mov ebp, dword [ebx]
je 0x41bc83
cmp byte [ebx + 0x231], 0
push esi
push edi
jne 0x41bc37
mov esi, dword [esp + 0x11c]
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x98]
mov dword [esp + 0x14], pe_nt_image_headers32
push eax
push esi
call dword [sym.imp.WSOCK32.DLL_getpeername]
test eax, eax
je 0x41bb3b
call dword [sym.imp.WSOCK32.DLL_WSAGetLastError]
mov esi, eax
push esi
push ebx
call fcn.0042d070
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
push ebp
call fcn.00418710
add esp, 0x18
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x104
ret
push pe_nt_image_headers32
lea eax, [esp + 0x18]
mov dword [esp + 0x14], pe_nt_image_headers32
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x18]
push eax
push esi
call dword [sym.imp.WSOCK32.DLL_getsockname]
test eax, eax
je 0x41bb96
call dword [sym.imp.WSOCK32.DLL_WSAGetLastError]
mov esi, eax
push esi
push ebx
call fcn.0042d070
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push ebp
call fcn.00418710
add esp, 0x18
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x104
ret
lea eax, [ebx + 0xd8]
push eax
lea esi, [ebx + 0xa8]
lea eax, [esp + 0x98]
push esi
push eax
call fcn.0041c170
add esp, 0xc
test al, al
jne 0x41bbe2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebx
call fcn.0042d070
push eax
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push ebp
call fcn.00418710
add esp, 0x18
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x104
ret
lea edi, [ebx + 0x48]
mov ecx, 0xb
rep movsd dword es:[edi], dword [esi]
lea eax, [ebx + 0x10c]
push eax
lea eax, [ebx + 0xdc]
push eax
lea eax, [esp + 0x1c]
movsw word es:[edi], word [esi]
push eax
call fcn.0041c170
add esp, 0xc
test al, al
jne 0x41bc37
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebx
call fcn.0042d070
push eax
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push ebp
call fcn.00418710
add esp, 0x18
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x104
ret
mov edi, dword [ebx]
lea esi, [ebx + 0xa8]
add edi, 0x8654
mov ecx, 0xb
rep movsd dword es:[edi], dword [esi]
mov ecx, 0xb
movsw word es:[edi], word [esi]
mov edi, dword [ebx]
lea esi, [ebx + 0xdc]
add edi, 0x8688
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov ecx, dword [ebx]
mov eax, dword [ebx + 0xd8]
pop edi
pop esi
mov dword [ecx + 0x8684], eax
mov ecx, dword [ebx]
mov eax, dword [ebx + 0x10c]
mov dword [ecx + 0x86b8], eax
pop ebp
pop ebx
add esp, 0x104
ret
Function at 0x41c4e0
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x10
push esi
mov esi, dword [esp + 0x18]
xor eax, eax
push edi
mov edi, dword [esp + 0x20]
push 4
cmp byte [esi + 0x398], al
setne al
mov dword [esp + 0x20], eax
lea eax, [esp + 0x20]
push eax
push 8
push 0xffff
push edi
call dword [sym.imp.WSOCK32.DLL_setsockopt]
test eax, eax
jns 0x41c52a
push edi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.004187e0
add esp, 0xc
pop edi
pop esi
add esp, 0x10
ret
push dword [esi + 0x39c]
mov dword [esp + 0x10], 1
call fcn.004271e0
push dword [esi + 0x3a0]
imul eax, eax, 0x3e8
mov dword [esp + 0x24], eax
mov dword [esp + 0x18], eax
call fcn.004271e0
add esp, 8
imul eax, eax, 0x3e8
push 0
push 0
mov dword [esp + 0x24], eax
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x10]
push eax
push 0
push 0
push 0xc
lea eax, [esp + 0x24]
push eax
push 0x98000004
push edi
call dword [sym.imp.WS2_32.DLL_WSAIoctl]
test eax, eax
je 0x41c5a1
call dword [sym.imp.WSOCK32.DLL_WSAGetLastError]
push eax
push edi
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
push esi
call fcn.004187e0
add esp, 0x10
pop edi
pop esi
add esp, 0x10
ret

Function at 0x41c5b0
Capabilities:
Set socket configuration

Disassembly:
push esi
push edi
mov edi, dword [esp + 0xc]
push 4
mov esi, dword [edi]
movzx eax, byte [esi + 0x29a]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x10]
push eax
push 1
push 6
push dword [esp + 0x20]
call dword [sym.imp.WSOCK32.DLL_setsockopt]
test eax, eax
jns 0x41c5fb
call dword [sym.imp.WSOCK32.DLL_WSAGetLastError]
push eax
push edi
call fcn.0042d070
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.004187e0
add esp, 0x14
pop edi
pop esi
ret
push str.TCP_NODELAY_set_n
push esi
call fcn.004187e0
add esp, 8
pop edi
pop esi
ret
Function at 0x4233e0
Capabilities:
Parse pe header

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
mov edi, dword [esp + 0x14]
mov bl, byte [esi]
test bl, bl
je 0x423491
mov cl, byte [edi]
test cl, cl
je 0x423491
movsx eax, bl
add eax, 0xffffff9f
cmp eax, 0x19
ja case.default.0x42340a
jmp dword [eax*4 + 0x4234b8]
mov bl, 0x41
jmp case.default.0x42340a
mov bl, 0x42
jmp case.default.0x42340a
mov bl, 0x43
jmp case.default.0x42340a
mov bl, 0x44
jmp case.default.0x42340a
mov bl, 0x45
jmp case.default.0x42340a
mov bl, 0x46
jmp case.default.0x42340a
mov bl, 0x47
jmp case.default.0x42340a
mov bl, 0x48
jmp case.default.0x42340a
mov bl, 0x49
jmp case.default.0x42340a
mov bl, 0x4a
jmp case.default.0x42340a
mov bl, 0x4b
jmp case.default.0x42340a
mov bl, 0x4c
jmp case.default.0x42340a
mov bl, 0x4d
jmp case.default.0x42340a
mov bl, 0x4e
jmp case.default.0x42340a
mov bl, 0x4f
jmp case.default.0x42340a
mov bl, 0x50
jmp case.default.0x42340a
mov bl, 0x51
jmp case.default.0x42340a
mov bl, 0x52
jmp case.default.0x42340a
mov bl, 0x53
jmp case.default.0x42340a
mov bl, 0x54
jmp case.default.0x42340a
mov bl, 0x55
jmp case.default.0x42340a
mov bl, 0x56
jmp case.default.0x42340a
mov bl, 0x57
jmp case.default.0x42340a
mov bl, 0x58
jmp case.default.0x42340a
mov bl, 0x59
jmp case.default.0x42340a
mov bl, 0x5a
push ecx
call fcn.00423690
add esp, 4
cmp bl, al
jne 0x423491
mov bl, byte [esi + 1]
inc esi
inc edi
test bl, bl
jne 0x4233f5
movzx eax, byte [esi]
push eax
call fcn.00423690
movzx ecx, byte [edi]
mov bl, al
push ecx
call fcn.00423690
add esp, 8
xor ecx, ecx
cmp bl, al
sete cl
pop edi
pop esi
mov eax, ecx
pop ebx
ret