joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10022150
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 0x10022182
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x2733
neg eax
sbb eax, eax
and eax, 0xffffffe7
add eax, 0x51
ret
mov ecx, dword [esp + 0x10]
mov dword [ecx], eax
xor eax, eax
ret

Function at 0x100222e0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0xa4
mov eax, dword [0x1007f1e0]
xor eax, esp
mov dword [esp + 0xa0], eax
mov eax, dword [esp + 0xb8]
push ebx
mov ebx, dword [esp + 0xb0]
push ebp
mov ebp, dword [esp + 0xb8]
push esi
mov esi, dword [esp + 0xb4]
cmp dword [esi + 0x398], 0
push edi
je case.default.0x10022340
test eax, eax
je case.default.0x10022340
mov eax, dword [eax + 0xa4]
test eax, eax
je case.default.0x10022340
lea edx, [ebx - 1]
mov ecx, str.Data
cmp edx, 3
ja case.default.0x10022340
jmp dword [edx*4 + 0x1002245c]
mov ecx, str.Header
mov edx, str.from
jmp 0x1002235d
mov ecx, str.Header
mov edx, 0x1006d3ac
push eax
push edx
push ecx
push str.__s__s__s_
lea eax, [esp + 0x20]
push 0xa0
push eax
call fcn.100266b0
lea eax, [esp + 0x28]
add esp, 0x18
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10022380
sub eax, edx
mov edi, eax
mov eax, dword [esi + 0x1c8]
test eax, eax
je 0x100223d5
mov ecx, dword [esi + 0x154]
push ecx
push edi
lea edx, [esp + 0x18]
push edx
push 0
push esi
call eax
add esp, 0x14
test eax, eax
jne 0x10022440
mov eax, dword [esi + 0x1c8]
test eax, eax
je 0x10022403
mov ecx, dword [esi + 0x154]
mov edx, dword [esp + 0xc4]
push ecx
push edx
push ebp
push ebx
push esi
call eax
add esp, 0x14
jmp 0x10022440
mov eax, dword [esi + 0x150]
push eax
push 1
push 2
push 0x1006d388
call fcn.1004d805
mov ecx, dword [esi + 0x150]
push ecx
push 1
lea edx, [esp + 0x28]
push edi
push edx
call fcn.1004d805
add esp, 0x20
jmp case.default.0x10022340
test ebx, ebx
jl 0x1002243e
cmp ebx, 2
jg 0x1002243e
mov eax, dword [esi + 0x150]
push eax
push 1
lea ecx, [ebx + ebx*2 + 0x1006d388]
push 2
push ecx
call fcn.1004d805
mov edx, dword [esi + 0x150]
mov eax, dword [esp + 0xd4]
push edx
push 1
push eax
push ebp
call fcn.1004d805
add esp, 0x20
xor eax, eax
mov ecx, dword [esp + 0xb0]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1004d073
add esp, 0xa4
ret
Function at 0x100228f0
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov edx, dword [eax + 0x458]
push ebx
mov ebx, dword [eax + ecx*4 + 0x198]
push esi
lea esi, [ecx + 0x1c]
shl esi, 4
add esi, eax
push edi
mov edi, dword [esi + 4]
sub edi, dword [esi + 8]
test byte [edx + 0x3c], 3
je 0x1002299b
cmp dword [eax + ecx*4 + 0x1b0], 0x10022690
jne 0x1002299b
cmp dword [esi], 0
je 0x1002292e
test edi, edi
je 0x1002299b
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push ebx
call fcn.10018440
add esp, 0x14
cmp eax, 0xffffffff
je 0x1002299b
test al, 1
je 0x1002299b
cmp dword [esi], 0
jne 0x10022979
push 0x8000
mov dword [esi + 4], 0x8000
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
je 0x10022994
mov eax, dword [esi]
add eax, dword [esi + 8]
push 0
push edi
push eax
push ebx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x1002299b
add dword [esi + 8], eax
pop edi
pop esi
pop ebx
ret
mov dword [esi + 4], 0
pop edi
pop esi
pop ebx
ret

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

Disassembly:
mov ecx, dword [esp + 8]
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
mov edi, dword [esi + ecx*4 + 0x198]
mov eax, esi
call fcn.100228f0
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
push 0
push eax
push ecx
push edi
call dword [sym.imp.WS2_32.dll_send]
mov ebx, dword [esp + 0x20]
mov edi, eax
mov dword [ebx], 0
cmp edi, 0xffffffff
jne 0x10022a24
push ebp
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, eax
cmp ebp, 0x2733
jne 0x100229fb
pop ebp
pop edi
pop esi
mov dword [ebx], 0x51
xor eax, eax
pop ebx
ret
push ebp
push esi
call fcn.10017a20
mov edx, dword [esi]
push eax
push str.Send_failure:__s
push edx
call fcn.10022500
mov eax, dword [esi]
mov dword [eax + 0x475c], ebp
add esp, 0x14
mov dword [ebx], 0x37
mov eax, edi
pop ebp
pop edi
pop esi
pop ebx
ret

Function at 0x10024880
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x14
xor eax, eax
cmp dword [esi + 0x558], eax
push 4
lea ecx, [esp + 4]
push ecx
setne al
push 8
push 0xffff
push edi
mov dword [esp + 0x14], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x100248be
push edi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.10022470
add esp, 0xc
add esp, 0x14
ret
mov edx, dword [esi + 0x55c]
push edx
mov dword [esp + 0xc], 1
call fcn.100272b0
imul eax, eax, 0x3e8
mov dword [esp + 4], eax
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0x560]
push eax
call fcn.100272b0
imul eax, eax, 0x3e8
add esp, 8
push 0
push 0
lea ecx, [esp + 0xc]
push ecx
push 0
push 0
push 0xc
lea edx, [esp + 0x20]
push edx
push 0x98000004
push edi
mov dword [esp + 0x24], eax
mov dword [esp + 0x34], eax
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x10024937
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.10022470
add esp, 0x10
add esp, 0x14
ret
Function at 0x10024f70
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x10c
mov eax, dword [0x1007f1e0]
xor eax, esp
mov dword [esp + 0x108], eax
push ebp
mov ebp, dword [esp + 0x114]
cmp dword [ebp + 0x94], 2
push edi
mov edi, dword [ebp]
mov dword [esp + 0xc], edi
je 0x100250f2
cmp dword [ebp + 0x3b8], 0
push ebx
push esi
jne 0x100250e7
cmp dword [ebp + 0x428], 0
jne 0x100250e7
mov esi, dword [esp + 0x124]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x9c]
push ecx
mov ebx, 0x80
push esi
mov dword [esp + 0x1c], ebx
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x10025009
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebp
call fcn.10017a20
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
push edi
call fcn.10022500
add esp, 0x18
jmp 0x100250f0
push ebx
lea edx, [esp + 0x1c]
push 0
push edx
mov dword [esp + 0x1c], ebx
call fcn.1004f300
add esp, 0xc
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x1c]
push ecx
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x10025056
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebp
call fcn.10017a20
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
call fcn.10022500
add esp, 0x18
jmp 0x100250f0
lea edi, [ebp + 0x10a]
lea ebx, [ebp + 0x138]
lea esi, [esp + 0x98]
call fcn.10024f30
test eax, eax
jne 0x10025097
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebp
call fcn.10017a20
mov edx, dword [esp + 0x1c]
push eax
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push edx
call fcn.10022500
add esp, 0x18
jmp 0x100250f0
lea edi, [ebp + 0x60]
mov ecx, 0xb
lea esi, [ebp + 0x10a]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea ebx, [ebp + 0x16c]
lea edi, [ebp + 0x13c]
lea esi, [esp + 0x18]
call fcn.10024f30
test eax, eax
jne 0x100250e7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebp
call fcn.10017a20
push eax
mov eax, dword [esp + 0x20]
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push eax
call fcn.10022500
add esp, 0x18
jmp 0x100250f0
push ebp
call fcn.10024eb0
add esp, 4
pop esi
pop ebx
mov ecx, dword [esp + 0x110]
pop edi
pop ebp
xor ecx, esp
call fcn.1004d073
add esp, 0x10c
ret

Function at 0x10025110
Capabilities:
Set socket configuration

Disassembly:
mov ecx, dword [esp + 8]
push esi
push edi
mov edi, dword [esp + 0xc]
mov esi, dword [edi]
push 4
lea eax, [esp + 0x10]
push eax
push 1
push 6
push ecx
mov dword [esp + 0x20], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x10025159
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.10017a20
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.10022470
add esp, 0x14
pop edi
pop esi
ret
push str.TCP_NODELAY_set_n
push esi
call fcn.10022470
add esp, 8
pop edi
pop esi
ret
Function at 0x100252b0
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov eax, dword [esp + 4]
cmp dword [eax + 0x1e0], 0
je 0x100252cd
push eax
call fcn.10019ca0
add esp, 4
test eax, eax
jne 0x100252ed
xor eax, eax
ret
mov eax, dword [eax + 0x198]
cmp eax, 0xffffffff
je 0x100252ca
push 2
push 1
lea ecx, [esp + 0xc]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jne 0x100252ed
ret
mov eax, 1
ret
Function at 0x1002f6b0
Capabilities:
Get common file path

Disassembly:
push ecx
push ebp
push esi
push str.kernel32
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, eax
test esi, esi
jne 0x1002f6ca
pop esi
pop ebp
pop ecx
ret
push ebx
push edi
push str.LoadLibraryExA
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, dword [esp + 0x18]
mov edi, eax
push 0x1006edec
push ebx
mov dword [esp + 0x18], edi
call fcn.100514a0
add esp, 8
test eax, eax
je 0x1002f716
test edi, edi
je 0x1002f707
push 8
push 0
push ebx
call edi
pop edi
pop ebx
pop esi
mov ebp, eax
pop ebp
pop ecx
ret
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
pop edi
pop ebx
pop esi
mov ebp, eax
pop ebp
pop ecx
ret
test edi, edi
je 0x1002f73c
push str.AddDllDirectory
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x1002f73c
push 0x800
push 0
push ebx
call edi
pop edi
pop ebx
pop esi
mov ebp, eax
pop ebp
pop ecx
ret
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edi, eax
test edi, edi
je 0x1002f7f0
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002f755
sub eax, edx
lea eax, [eax + edi + 1]
push eax
call dword [section..data]
mov esi, eax
add esp, 4
test esi, esi
je 0x1002f7e6
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x1002f7e6
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002f783
sub eax, edx
mov ecx, 0x5c
mov word [eax + esi], cx
mov eax, esi
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002f7a0
sub eax, edx
lea edx, [eax + esi]
mov ecx, ebx
sub edx, ebx
mov al, byte [ecx]
mov byte [edx + ecx], al
inc ecx
test al, al
jne 0x1002f7b0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x1002f7dd
push 8
push 0
push esi
call eax
push esi
mov ebp, eax
call dword [0x1007f004]
add esp, 4
pop edi
pop ebx
pop esi
mov eax, ebp
pop ebp
pop ecx
ret
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebp, eax
push esi
call dword [0x1007f004]
add esp, 4
pop edi
pop ebx
pop esi
mov eax, ebp
pop ebp
pop ecx
ret
Function at 0x1002f840
Capabilities:
Resolve dns

Disassembly:
sub esp, 0xc
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
push ebx
push ebp
lea ecx, [esp + 0x10]
push ecx
mov ecx, dword [esp + 0x1c]
xor ebx, ebx
mov dword [eax], ebx
mov eax, dword [esp + 0x20]
push edx
push eax
push ecx
mov dword [esp + 0x18], ebx
xor ebp, ebp
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [esp + 0xc], eax
cmp eax, ebx
jne 0x1002f9f1
push edi
mov edi, dword [esp + 0x14]
cmp edi, ebx
je 0x1002f9cf
push esi
jmp 0x1002f890
cmp dword [edi + 4], 2
jne 0x1002f948
cmp dword [edi + 0x18], ebx
je 0x1002f948
mov eax, dword [edi + 0x10]
cmp eax, ebx
jbe 0x1002f948
cmp eax, 0x10
jb 0x1002f948
push 0x20
call dword [section..data]
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x1002f955
mov edx, dword [edi]
mov dword [esi], edx
mov eax, dword [edi + 4]
mov dword [esi + 4], eax
mov ecx, dword [edi + 8]
mov dword [esi + 8], ecx
mov edx, dword [edi + 0xc]
push 0x10
mov dword [esi + 0xc], edx
mov dword [esi + 0x10], 0x10
mov dword [esi + 0x18], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x1c], ebx
call dword [section..data]
add esp, 4
mov dword [esi + 0x18], eax
cmp eax, ebx
je 0x1002f95f
mov ecx, dword [edi + 0x18]
mov edx, dword [ecx]
mov dword [eax], edx
mov edx, dword [ecx + 4]
mov dword [eax + 4], edx
mov edx, dword [ecx + 8]
mov dword [eax + 8], edx
mov ecx, dword [ecx + 0xc]
mov dword [eax + 0xc], ecx
mov eax, dword [edi + 0x14]
cmp eax, ebx
je 0x1002f935
push eax
call dword [0x1007f00c]
add esp, 4
mov dword [esi + 0x14], eax
cmp eax, ebx
je 0x1002f973
cmp dword [esp + 0x10], ebx
jne 0x1002f93f
mov dword [esp + 0x10], esi
cmp ebp, ebx
je 0x1002f946
mov dword [ebp + 0x1c], esi
mov ebp, esi
mov edi, dword [edi + 0x1c]
cmp edi, ebx
jne 0x1002f890
jmp 0x1002f98f
mov dword [esp + 0x14], 8
jmp 0x1002f98f
push esi
mov dword [esp + 0x18], 8
call dword [0x1007f004]
add esp, 4
jmp 0x1002f98f
mov edx, dword [esi + 0x18]
push edx
mov dword [esp + 0x18], 8
call dword [0x1007f004]
push esi
call dword [0x1007f004]
add esp, 8
mov eax, dword [esp + 0x18]
pop esi
cmp eax, ebx
je 0x1002f99f
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
cmp dword [esp + 0x10], ebx
je 0x1002f9c9
mov eax, dword [esp + 0xc]
push eax
call fcn.1002f800
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x14]
add esp, 4
pop edi
mov ecx, ebx
pop ebp
mov dword [esp + 4], ebx
mov dword [edx], ecx
pop ebx
add esp, 0xc
ret
cmp dword [esp + 0xc], ebx
jne 0x1002f9e2
push 0x2af9
mov dword [esp + 0x14], 0x2af9
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x10]
mov dword [edx], ecx
pop edi
pop ebp
pop ebx
add esp, 0xc
ret

Function at 0x1002fc30
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.1004e968
add esp, 0x18
test eax, eax
je 0x1002fc53
cmp eax, 0xffffffff
jne 0x1002fc55
xor eax, eax
ret
Function at 0x100314b0
Capabilities:
Generate random numbers via winapi

Disassembly:
push ecx
push 0xf0000040
push 1
push 0
push 0
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x14], 0
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x100314f8
mov ecx, dword [esp + 8]
mov edx, dword [esp + 0xc]
mov eax, dword [esp]
push ecx
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
push 0
test eax, eax
jne 0x100314ff
mov ecx, dword [esp + 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, 2
pop ecx
ret
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
xor eax, eax
pop ecx
ret
Function at 0x10039180
Capabilities:
Send data
Send data on socket

Disassembly:
mov eax, dword [esi + 0x10]
mov ecx, dword [eax]
push str.Connected_for_receive
push 0x1006d5b8
push ecx
call fcn.10022470
add esp, 0xc
mov eax, esi
mov dword [esi], 1
call fcn.100382c0
test eax, eax
jne 0x100391b0
mov eax, esi
jmp fcn.10038700
ret
Function at 0x100395d0
Capabilities:
Receive data
Receive data on socket

Disassembly:
sub esp, 0x88
mov eax, dword [0x1007f1e0]
xor eax, esp
mov dword [esp + 0x84], eax
push ebx
push ebp
mov ebp, dword [esp + 0x94]
push esi
mov esi, dword [ebp + 0x6a0]
push edi
mov edi, dword [ebp]
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x14], 0x80
mov edx, dword [esi + 0x154]
mov eax, dword [esi + 0x15c]
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esi + 0x14]
push 0
add edx, 4
push edx
push eax
push ecx
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [esi + 0x148], 0
mov dword [esi + 0x14c], eax
jne 0x10039659
mov edx, dword [esp + 0x10]
push edx
lea eax, [esp + 0x18]
push eax
lea ecx, [esi + 0xc8]
push ecx
call fcn.1004ff70
mov edx, dword [esp + 0x1c]
add esp, 0xc
mov dword [esi + 0x148], edx
mov ecx, dword [esi + 0x14c]
cmp ecx, 4
jge 0x10039694
push str.Received_too_short_packet
push edi
call fcn.10022500
add esp, 8
mov dword [esi + 0xc], 7
xor eax, eax
mov ecx, dword [esp + 0x94]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1004d073
add esp, 0x88
ret
mov edx, dword [esi + 0x15c]
movzx ax, byte [edx]
movzx edx, byte [edx + 1]
shl ax, 8
movzx eax, ax
or eax, edx
mov dword [esi + 0xc], eax
add eax, 0xfffffffd
cmp eax, 3
ja case.default.0x100396ba
jmp dword [eax*4 + 0x100397e0]
cmp ecx, 4
jle case.0x100396ba.4
mov eax, dword [esi + 0x15c]
movzx dx, byte [eax + 2]
movzx eax, byte [eax + 3]
shl dx, 8
movzx edx, dx
or edx, eax
movzx eax, word [esi + 0x40]
inc eax
and eax, 0xffff
cmp eax, edx
jne case.0x100396ba.4
add ecx, 0xfffffffc
push ecx
mov ecx, dword [esi + 0x15c]
add ecx, 4
push ecx
push 1
push ebp
call fcn.100228b0
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x10039726
mov ecx, 5
mov eax, esi
call fcn.10039550
mov eax, ebx
jmp 0x1003967b
mov eax, dword [esi + 0x14c]
sub eax, 4
cdq
add dword [edi + 0x90], eax
mov eax, dword [edi + 0x90]
adc dword [edi + 0x94], edx
mov edx, dword [edi + 0x94]
push edx
push eax
push edi
call fcn.1002a040
jmp 0x100397b4
mov eax, dword [esi + 0x15c]
movzx cx, byte [eax + 2]
movzx eax, byte [eax + 3]
shl cx, 8
movzx edx, cx
mov ecx, dword [esi + 0x15c]
add ecx, 4
push ecx
or edx, eax
push 0x1006d5b8
push edi
mov dword [esi + 8], edx
call fcn.10022470
jmp 0x100397b4
mov edx, dword [esi + 0x15c]
add ecx, 0xfffffffe
push ecx
add edx, 2
push edx
push esi
call fcn.100384b0
add esp, 0xc
test eax, eax
je case.0x100396ba.4
jmp 0x1003967b
push str.Internal_error:_Unexpected_packet
push 0x1006d3c8
push edi
call fcn.10022500
add esp, 0xc
push ebp
call fcn.1002a200
add esp, 4
test eax, eax
je 0x10039679
mov ecx, 5
mov eax, esi
call fcn.10039550
mov eax, 0x2a
jmp 0x1003967b
Function at 0x1003b190
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x194
mov eax, dword [0x1007f1e0]
xor eax, esp
mov dword [esp + 0x190], eax
lea eax, [esp]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x1003b1c5
push eax
push str.WSAStartup_failed___d_
push esi
call fcn.10022500
add esp, 0xc
jmp 0x1003b1fe
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [esp]
cmp al, 2
jne 0x1003b1f0
shr eax, 8
test al, al
jne 0x1003b1f0
xor eax, eax
mov ecx, dword [esp + 0x190]
xor ecx, esp
call fcn.1004d073
add esp, 0x194
ret
push str.insufficient_winsock_version_to_support_telnet
push esi
call fcn.10022500
add esp, 8
mov ecx, dword [esp + 0x190]
xor ecx, esp
mov eax, 2
call fcn.1004d073
add esp, 0x194
ret

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

Disassembly:
push ecx
mov edx, dword [edi + 0x198]
mov al, byte [esp + 8]
push esi
mov esi, dword [edi]
push 0
push 3
lea ecx, [esp + 0xc]
push ecx
push edx
mov byte [esp + 0x14], 0xff
mov byte [esp + 0x15], al
mov byte [esp + 0x16], bl
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jge 0x1003b3d4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push esi
call fcn.10022500
add esp, 0xc
mov esi, dword [esp + 0xc]
mov ecx, dword [edi]
push str.SENT
mov eax, ebx
call fcn.1003b290
add esp, 4
pop esi
pop ecx
ret
Function at 0x1003c090
Capabilities:
Send data
Send data on socket

Disassembly:
push ecx
cmp dword [esp + 0xc], 0x1f
mov eax, dword [esp + 8]
mov eax, dword [eax]
push ebx
mov ebx, dword [eax + 0x148]
mov dword [esp + 4], eax
jne 0x1003c1f9
push ebp
push esi
push edi
lea edi, [ebx + 0x1cb0]
lea ebp, [ebx + 0x1eb0]
mov dword [ebp], edi
cmp edi, ebp
jae 0x1003c0c9
mov byte [edi], 0xff
inc dword [ebp]
mov eax, dword [ebp]
cmp eax, ebp
jae 0x1003c0d6
mov byte [eax], 0xfa
inc dword [ebp]
mov eax, dword [ebp]
cmp eax, ebp
jae 0x1003c0e3
mov byte [eax], 0x1f
inc dword [ebp]
movzx ecx, word [ebx + 0x1ca8]
mov esi, dword [sym.imp.WS2_32.dll_htons]
push ecx
call esi
movzx edx, ax
movzx eax, word [ebx + 0x1caa]
push eax
mov dword [esp + 0x20], edx
call esi
movzx ecx, ax
mov eax, dword [ebp]
cmp eax, ebp
jae 0x1003c117
mov dl, byte [esp + 0x1c]
mov byte [eax], dl
inc dword [ebp]
mov eax, dword [ebp]
cmp eax, ebp
jae 0x1003c127
mov dl, byte [esp + 0x1d]
mov byte [eax], dl
inc dword [ebp]
mov eax, dword [ebp]
cmp eax, ebp
jae 0x1003c133
mov byte [eax], cl
inc dword [ebp]
mov eax, dword [ebp]
cmp eax, ebp
jae 0x1003c13f
mov byte [eax], ch
inc dword [ebp]
mov eax, dword [ebp]
cmp eax, ebp
jae 0x1003c14c
mov byte [eax], 0xff
inc dword [ebp]
mov eax, dword [ebp]
cmp eax, ebp
jae 0x1003c159
mov byte [eax], 0xf0
inc dword [ebp]
mov eax, dword [ebp]
mov esi, dword [esp + 0x10]
mov ecx, eax
sub ecx, edi
sub ecx, 2
push ecx
mov dword [ebx + 0x1eb4], eax
lea eax, [ebx + 0x1cb2]
push 0x3e
mov dword [ebp], edi
call fcn.1003b5f0
mov ebp, dword [sym.imp.WS2_32.dll_send]
add esp, 8
push 0
push 3
push edi
mov edi, dword [esp + 0x24]
mov edx, dword [edi + 0x198]
push edx
call ebp
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
jge 0x1003c1b8
call esi
push eax
mov eax, dword [esp + 0x14]
push str.Sending_data_failed___d_
push eax
call fcn.10022500
add esp, 0xc
lea ecx, [ebx + 0x1cb3]
push 4
push ecx
call fcn.1003be70
mov edx, dword [edi + 0x198]
add esp, 8
push 0
push 2
add ebx, 0x1cb7
push ebx
push edx
call ebp
test eax, eax
jge 0x1003c1f6
call esi
push eax
mov eax, dword [esp + 0x14]
push str.Sending_data_failed___d_
push eax
call fcn.10022500
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x1003cde0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x18
mov eax, dword [0x1007f1e0]
xor eax, esp
mov dword [esp + 0x14], eax
push ebx
push ebp
push esi
push edi
mov esi, ecx
mov ebx, dword [esi + 0x19c]
mov ebp, dword [esi]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x18]
push ecx
push ebx
or edi, 0xffffffff
mov dword [esp + 0x1c], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x1003ce37
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x18]
push eax
push ebx
mov dword [esp + 0x1c], 0x10
call dword [sym.imp.WS2_32.dll_accept]
mov edi, eax
push ebx
push esi
call fcn.10025300
add esp, 8
cmp edi, 0xffffffff
jne 0x1003ce6c
push str.Error_accept__ing_server_connect
push ebp
call fcn.10022500
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0x1e
pop ebx
mov ecx, dword [esp + 0x14]
xor ecx, esp
call fcn.1004d073
add esp, 0x18
ret
push str.Connection_accepted_from_server_n
push ebp
call fcn.10022470
push 1
push edi
mov dword [esi + 0x3e0], 0
mov dword [esi + 0x19c], edi
call fcn.10043e50
mov dword [esi + 0x1ac], 1
mov eax, dword [ebp + 0x1d0]
add esp, 0x10
test eax, eax
je 0x1003ced6
mov ecx, dword [ebp + 0x1d4]
push 1
push edi
push ecx
call eax
add esp, 0xc
test eax, eax
je 0x1003ced6
call fcn.1003cd40
pop edi
pop esi
pop ebp
mov eax, 0x2a
pop ebx
mov ecx, dword [esp + 0x14]
xor ecx, esp
call fcn.1004d073
add esp, 0x18
ret
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.1004d073
add esp, 0x18
ret
Function at 0x10040740
Capabilities:
Check http status code

Disassembly:
mov eax, 0x51eb851f
imul ecx
sar edx, 5
push ebx
mov ebx, dword [edi]
mov eax, edx
push ebp
mov ebp, dword [esp + 0xc]
shr eax, 0x1f
push esi
add eax, edx
xor esi, esi
cmp eax, 2
je 0x10040776
push str.Couldnt_set_desired_mode
push ebx
call fcn.10022500
add esp, 8
lea eax, [esi + 0x11]
pop esi
pop ebp
pop ebx
ret
cmp ecx, 0xc8
je 0x1004078d
push ecx
push str.Got_a__03d_response_code_instead_of_the_assumed_200_n
push ebx
call fcn.10022470
add esp, 0xc
cmp ebp, 0x13
jne 0x100407a1
push edi
call fcn.100406c0
add esp, 4
mov esi, eax
pop esi
pop ebp
pop ebx
ret
cmp ebp, 0x14
jne 0x100407b5
push edi
call fcn.1003d910
add esp, 4
mov esi, eax
pop esi
pop ebp
pop ebx
ret
cmp ebp, 0x15
jne 0x100407cd
push 0xd
push 1
push edi
call fcn.1003fa00
add esp, 0xc
mov esi, eax
pop esi
pop ebp
pop ebx
ret
cmp ebp, 0x16
jne 0x100407e1
push 0xe
push 1
push edi
call fcn.1003fa00
add esp, 0xc
mov esi, eax
mov eax, esi
pop esi
pop ebp
pop ebx
ret