Function at 0x40e699
Capabilities:
Create thread
Initialize winsock library
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea esi, [ebp - 0x1a8]
push ebx
sub esp, 0x1e4
mov ebx, dword [sym.imp.WS2_32.dll_WSAStartup]
push esi
push 0x202
call ebx
pop ecx
pop edi
test eax, eax
je 0x40e6c8
push eax
push eax
push esi
push 2
call ebx
pop eax
pop edx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x46dd44], eax
mov eax, dword [0x42e46c]
add eax, dword [0x42e464]
add eax, dword [0x42e474]
add eax, dword [0x42e470]
add eax, dword [0x42e468]
add eax, dword [0x42e478]
lea edx, [eax + 8]
add eax, 0x18
add eax, eax
mov dword [0x46d98c], edx
or edx, 0xffffffff
cmp eax, 0x1fffffff
ja 0x40e715
lea edx, [eax*4]
sub esp, 0xc
push edx
call fcn.0042d4e4
mov edx, dword [0x46d98c]
pop esi
mov dword [ebp - 0x1d0], 3
mov dword [0x46d75c], eax
pop edi
lea eax, [eax + edx*4 + 0x40]
push 0x1f6
mov dword [0x46d758], eax
mov eax, dword [0x46d948]
mov dword [ebp - 0x1cc], fcn.004022e7
mov dword [ebp - 0x1c8], 0
mov dword [ebp - 0x1c4], 0
mov dword [ebp - 0x1c0], eax
push eax
call dword [sym.imp.USER32.dll_LoadIconA]
push 0x7f00
mov dword [0x46d880], eax
mov dword [ebp - 0x1bc], eax
push 0
call dword [sym.imp.USER32.dll_LoadCursorA]
mov dword [ebp - 0x1b4], 0x10
mov dword [ebp - 0x1b8], eax
push eax
lea eax, [ebp - 0x1d0]
mov dword [ebp - 0x1b0], 0
mov dword [ebp - 0x1ac], str.FMFROM
push eax
call dword [sym.imp.USER32.dll_RegisterClassA]
mov edx, eax
add esp, 0xc
xor eax, eax
test dx, dx
je 0x40ed76
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov dword [0x46d970], eax
mov edi, eax
cld
xor al, al
xor ecx, ecx
dec ecx
repne scasb al, byte es:[edi]
cmp byte [edi], al
jne 0x40e7e0
inc ecx
not ecx
inc ecx
mov dword [0x46d96c], ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [0x46d4e4], eax
call fcn.004039a6
mov ecx, 0x4644a0
call fcn.00403b7e
push ebx
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
push str.Small_HTTP_Server_ver._3.06.30_r_nby_Max_Feoktistov_r_nE_mail:_support_smallsrv.com_r_n__C__1999_2024_r_nMD5_cashe_function_derived_from_the_RSA_Data_Security__Inc._MD5_Message_Digest_Algorithm_r_n
push str._s_r_n_r_n
push dword [0x4644a4]
call ebx
add eax, dword [0x4644a4]
mov dword [0x4644a4], eax
add esp, 0x10
cmp dword [0x42e464], 0
je 0x40e858
push dword [0x42e4c4]
push dword [0x46dcc4]
push dword [0x4357a8]
push eax
call ebx
add dword [0x4644a4], eax
add esp, 0x10
xor esi, esi
cmp esi, 5
je 0x40e905
cmp dword [esi*4 + 0x42e464], 0
je 0x40e905
sub esp, 0xc
push esi
call fcn.0040e491
add esp, 0x10
mov dword [esi*4 + 0x42e464], eax
test eax, eax
je 0x40e8b1
sub esp, 0xc
push eax
push dword [esi*4 + 0x42e688]
push dword [esi*4 + 0x42f960]
push dword [0x43577c]
push dword [0x4644a4]
call ebx
add dword [0x4644a4], eax
add esp, 0x20
mov eax, 1
mov ecx, esi
shl eax, cl
and eax, dword [0x46d980]
je 0x40e905
cmp dword [esi*4 + 0x46db80], 0
je 0x40e8f2
mov eax, dword [0x4644a4]
push ecx
push ecx
sub eax, 2
push str.__IPv6__r_n
push eax
call ebx
mov edx, dword [0x4644a4]
lea eax, [edx + eax - 2]
add esp, 0x10
mov dword [0x4644a4], eax
jmp 0x40e905
sub esp, 0xc
lea eax, [esi + 0xa]
push eax
call fcn.0040e491
add esp, 0x10
test eax, eax
jg 0x40e8cc
inc esi
cmp esi, 7
jne 0x40e85a
cmp dword [0x42e468], 0
je 0x40e94f
mov eax, dword [0x46d938]
shl eax, 0xa
mov dword [0x46d93c], eax
je 0x40e94f
add eax, 0x400
push edi
push eax
push 0x1000
push 0
call dword [sym.imp.KERNEL32.dll_HeapCreate]
mov dword [0x46d944], eax
pop edx
test eax, eax
jne 0x40e94f
mov dword [0x46d93c], 0
cmp dword [0x42e470], 0
je 0x40e9c3
push edi
push edi
push 0x46d4e0
push 0
push 0
push 0x41d0fb
push 0x2000
push 0x42e458
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edx, dword [0x42e66c]
mov word [0x43ded0], 0
mov dword [0x46d9ec], eax
mov eax, dword [0x42e668]
pop ecx
pop esi
test eax, eax
jne 0x40e99c
mov eax, 0x440fe1
push esi
push esi
push edx
push eax
push dword [0x42e670]
push dword [0x42e678]
push dword [0x435730]
push dword [0x4644a4]
call ebx
add dword [0x4644a4], eax
add esp, 0x20
mov eax, dword [0x46d97c]
mov edx, dword [0x46d980]
and eax, 2
and edx, 0x4000000
or eax, edx
or eax, dword [0x42e478]
je 0x40ead6
cmp dword [str.libsec111.dll], 0
je 0x40ea31
call fcn.00424472
test eax, eax
je 0x40ea31
push ecx
push dword [0x47a7ac]
push dword [0x438f64]
push dword [0x47a7b0]
push dword [0x47a7b4]
push 0x40aa5c
push fcn.0040b3df
push 0x4042d7
call dword [0x47a7a8]
add esp, 0x20
test eax, eax
jne 0x40ea4b
jmp 0x40ead6
push edx
push edx
push str.Error._Cant_load_TLS_SSL_library_r_n
push dword [0x4644a4]
call ebx
add dword [0x4644a4], eax
jmp 0x40ead3
test byte [0x46d97c], 2
je 0x40ea5b
or dword [0x46d974], 0x10
cmp dword [0x42e478], 0
je 0x40ead6
sub esp, 0xc
push 5
call fcn.0040e491
mov dword [esp], eax
push dword [0x42e69c]
push 0x441021
push dword [0x43577c]
push dword [0x4644a4]
mov dword [0x42e478], eax
call ebx
add dword [0x4644a4], eax
add esp, 0x20
test byte [0x46d980], 0x20
je 0x40ead6
sub esp, 0xc
push 0xf
call fcn.0040e491
add esp, 0x10
test eax, eax
jle 0x40ead6
push eax
push eax
mov eax, dword [0x4644a4]
push str.__IPv6__r_n
sub eax, 2
push eax
call ebx
mov edx, dword [0x4644a4]
lea eax, [edx + eax - 2]
mov dword [0x4644a4], eax
add esp, 0x10
push eax
push dword [0x42e688]
push 0x441029
push 0x46dcec
call ebx
add esp, 0xc
push dword [0x42e69c]
push 0x441029
push 0x46dce4
call ebx
add esp, 0x10
cmp dword [0x46d8c4], 0
je 0x40eb3a
call fcn.00424274
test eax, eax
je 0x40eb3a
push eax
push dword [0x46d89c]
push dword [0x4356d0]
push dword [0x4644a4]
call ebx
add dword [0x4644a4], eax
mov word [0x43ded8], 0
add esp, 0x10
cmp dword [0x47a7fc], 0
je 0x40eb8b
call fcn.004257f8
test eax, eax
jle 0x40eb8b
push eax
push eax
push 0x46d4e0
push 0
push 0
push 0x42586a
push 0x1000
push 0x42e458
call dword [sym.imp.KERNEL32.dll_CreateThread]
sub esp, 0xc
push dword [0x47a7fc]
push str.DHCP_enabled.__u_IPs_for_allocate_r_n
push dword [0x4644a4]
call ebx
add dword [0x4644a4], eax
add esp, 0x20
cmp dword [0x42e478], 0
je 0x40ebb4
call fcn.0042bd59
inc eax
je 0x40ebb4
push eax
push eax
push str.TLS_VPN_enabled_r_n
push dword [0x4644a4]
call ebx
add dword [0x4644a4], eax
add esp, 0x10
mov eax, dword [0x47a8f0]
test eax, eax
je 0x40ebf8
cmp byte [eax], 0
je 0x40ebf8
push edi
push edi
push 0x46d4e0
push 0
push 0
push 0x42c7ba
push 0xe000
push 0x42e458
call dword [sym.imp.KERNEL32.dll_CreateThread]
push str.TLS_VPN_client_started_r_n
push dword [0x4644a4]
call ebx
add dword [0x4644a4], eax
add esp, 0x10
cmp dword [0x464334], 0
je 0x40ec23
push ecx
push ecx
push 0x46d4e0
push 0
push 0
push 0x40af86
push 0x2000
push 0x42e458
call dword [sym.imp.KERNEL32.dll_CreateThread]
pop ebx
pop esi
mov eax, dword [0x46d978]
mov ebx, dword [sym.imp.USER32.dll_CreateWindowExA]
push 0
push dword [0x46d948]
and eax, 0x8000
push 0
cmp eax, 1
mov dword [0x42e49c], eax
sbb eax, eax
push 0
and eax, 0x10000000
push 0x1e0
sub eax, 0x7d35fffc
push 0x1e0
push 0
push 0
push eax
push str.Small_Server
push str.FMFROM
push 0
call ebx
lea edx, [ebp - 0x1e0]
mov dword [0x46d950], eax
push esi
push esi
push edx
push eax
call dword [sym.imp.USER32.dll_GetClientRect]
push dword [sym.imp.USER32.dll_CreatePopupMenu]
push 0x43de80
call fcn.00404592
push 0
mov dword [0x47ab28], eax
push dword [0x46d948]
push 0x65
push dword [0x46d950]
push dword [ebp - 0x1d4]
push dword [ebp - 0x1d8]
push dword [ebp - 0x1dc]
push dword [ebp - 0x1e0]
push 0x50a00804
push dword [0x42e078]
push str.EDIT
push 0x200
call ebx
mov ebx, dword [0x47ab28]
pop edi
mov dword [0x46d94c], eax
pop eax
push 0
push dword [0x46d950]
call dword [sym.imp.USER32.dll_GetSystemMenu]
push edx
push str.Server
push ebx
push 0x490
push 0
push eax
call dword [sym.imp.USER32.dll_InsertMenuA]
mov eax, dword [0x46d950]
add esp, 0xc
mov dword [0x42e264], eax
mov eax, dword [0x46d880]
mov dword [0x42e274], eax
test byte [0x46d978], 0x10
jne 0x40ed48
push eax
push eax
push 0x42e260
push 0
call dword [sym.imp.SHELL32.dll_Shell_NotifyIconA]
test eax, eax
pop edx
pop ecx
sete al
movzx eax, al
or dword [0x46d974], eax
sub esp, 0xc
push 0x11
call dword [sym.imp.GDI32.dll_GetStockObject]
add esp, 0xc
push 1
push eax
push 0x30
push dword [0x46d94c]
call dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, 0x4644a0
call fcn.00404158
mov eax, 1
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret