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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
lea esi, [ebp - 0x1a8]
sub esp, 0x1e4
mov ebx, dword [sym.imp.WS2_32.dll_WSAStartup]
push esi
push 0x202
call ebx
test eax, eax
pop ecx
pop edi
je 0x40d772
push eax
push eax
push esi
push 2
call ebx
pop eax
pop edx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x465b64], eax
mov eax, dword [0x42a46c]
add eax, dword [0x42a464]
add eax, dword [0x42a474]
add eax, dword [0x42a470]
add eax, dword [0x42a468]
add eax, dword [0x42a478]
lea edx, [eax + 8]
mov dword [0x4657a8], edx
lea edx, [eax + eax + 0x30]
or eax, 0xffffffff
lea ecx, [edx*4]
cmp edx, 0x1fc00000
cmovbe eax, ecx
sub esp, 0xc
push eax
call fcn.00428e70
mov edx, dword [0x4657a8]
mov dword [0x46557c], eax
pop esi
pop edi
lea eax, [eax + edx*4 + 0x40]
push 0x1f6
mov dword [ebp - 0x1d0], 3
mov dword [ebp - 0x1cc], fcn.0040221c
mov dword [ebp - 0x1c8], 0
mov dword [0x465578], eax
mov eax, dword [0x465768]
mov dword [ebp - 0x1c4], 0
mov dword [ebp - 0x1c0], eax
push eax
call dword [sym.imp.USER32.dll_LoadIconA]
push 0x7f00
mov dword [0x4656a0], eax
mov dword [ebp - 0x1bc], eax
push 0
call dword [sym.imp.USER32.dll_LoadCursorA]
mov dword [ebp - 0x1b8], eax
push eax
lea eax, [ebp - 0x1d0]
mov dword [ebp - 0x1b4], 0x10
mov dword [ebp - 0x1b0], 0
mov dword [ebp - 0x1ac], str.FMFROM
push eax
call dword [sym.imp.USER32.dll_RegisterClassA]
xor edx, edx
add esp, 0xc
test ax, ax
je 0x40ddb2
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov dword [0x465790], eax
mov edi, eax
cld
xor al, al
xor ecx, ecx
dec ecx
repne scasb al, byte es:[edi]
cmp byte [edi], al
jne 0x40d889
inc ecx
not ecx
inc ecx
mov dword [0x46578c], ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [0x465304], eax
call fcn.00403968
mov ecx, 0x45c2c0
call fcn.00403b0a
push ebx
push str.Small_HTTP_Server_ver._3.06.24_r_nby_Max_Feoktistov_r_nE_mail:_support_smallsrv.com_r_n__C__1999_2023_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 [0x45c2c4]
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
call esi
add esp, 0x10
add eax, dword [0x45c2c4]
cmp dword [0x42a464], 0
mov dword [0x45c2c4], eax
je 0x40d901
push dword [0x42a4c4]
push dword [0x465ae4]
push dword [0x430fe8]
push eax
call esi
add dword [0x45c2c4], eax
add esp, 0x10
xor ebx, ebx
cmp ebx, 5
mov eax, 6
cmove ebx, eax
cmp dword [ebx*4 + 0x42a464], 0
je 0x40d98e
sub esp, 0xc
push ebx
call fcn.0040d511
add esp, 0x10
test eax, eax
mov dword [ebx*4 + 0x42a464], eax
je 0x40d958
sub esp, 0xc
push eax
push dword [ebx*4 + 0x42a688]
push dword [ebx*4 + 0x42b920]
push dword [0x430fbc]
push dword [0x45c2c4]
call esi
add dword [0x45c2c4], eax
add esp, 0x20
mov eax, 1
mov cl, bl
shl eax, cl
test dword [0x4657a0], eax
je 0x40d98e
cmp dword [ebx*4 + 0x4659a0], 0
jne 0x40dc80
lea eax, [ebx + 0xa]
sub esp, 0xc
push eax
call fcn.0040d511
add esp, 0x10
test eax, eax
jg 0x40dc80
inc ebx
cmp ebx, 7
jne 0x40d903
cmp dword [0x42a468], 0
je 0x40d9da
mov eax, dword [0x465758]
shl eax, 0xa
test eax, eax
mov dword [0x46575c], eax
je 0x40d9da
add eax, 0x400
push edx
push eax
push 0x1000
push 0
call dword [sym.imp.KERNEL32.dll_HeapCreate]
test eax, eax
mov dword [0x465764], eax
pop ecx
jne 0x40d9da
mov dword [0x46575c], 0
cmp dword [0x42a470], 0
je 0x40da4a
push edi
push edi
push 0x465300
push 0
push 0
push 0x41b53e
push 0x2000
push 0x42a458
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x46580c], eax
mov eax, dword [0x42a668]
mov edx, 0x43aad0
push dword [0x42a66c]
mov word [0x438330], 0
test eax, eax
cmove eax, edx
push eax
push dword [0x42a670]
push dword [0x42a678]
push dword [0x430f70]
push dword [0x45c2c4]
call esi
add dword [0x45c2c4], eax
add esp, 0x20
cmp dword [0x42a478], 0
jne 0x40da65
test byte [0x46579c], 2
jne 0x40da65
test byte [0x4657a3], 4
je 0x40dad1
cmp dword [str.seclib.dll], 0
je 0x40dca9
call fcn.00422613
test eax, eax
je 0x40dca9
push ecx
push dword [0x472c3c]
push dword [0x433444]
push dword [0x472c40]
push dword [0x472c44]
push 0x40a5f8
push fcn.0040a8dd
push 0x404229
call dword [0x472c38]
add esp, 0x20
test eax, eax
je 0x40dad1
test byte [0x46579c], 2
je 0x40dac4
or dword [0x465794], 0x10
cmp dword [0x42a478], 0
jne 0x40dcc6
push ecx
push dword [0x42a688]
push 0x43aaf2
push 0x465b0c
call esi
add esp, 0xc
push dword [0x42a69c]
push 0x43aaf2
push 0x465b04
call esi
add esp, 0x10
cmp dword [0x4656e4], 0
je 0x40db12
call fcn.00422535
test eax, eax
jne 0x40dd42
cmp dword [0x472c8c], 0
je 0x40db28
call fcn.004238cb
test eax, eax
jg 0x40dd6e
mov eax, dword [0x465798]
push 0
mov ebx, dword [sym.imp.USER32.dll_CreateWindowExA]
push dword [0x465768]
push 0
push 0
and eax, 0x8000
push 0x1e0
push 0x1e0
cmp eax, 1
mov dword [0x42a49c], eax
push 0
sbb eax, eax
push 0
and eax, 0x10000000
sub eax, 0x7d35fffc
push eax
push str.Small_Server
push str.FMFROM
push 0
call ebx
lea edx, [ebp - 0x1e0]
push esi
mov dword [0x465770], eax
push esi
push edx
push eax
call dword [sym.imp.USER32.dll_GetClientRect]
push dword [sym.imp.USER32.dll_CreatePopupMenu]
push 0x4382e0
call fcn.00404491
push 0
mov dword [0x472cec], eax
push dword [0x465768]
push 0x65
push dword [0x465770]
push dword [ebp - 0x1d4]
push dword [ebp - 0x1d8]
push dword [ebp - 0x1dc]
push dword [ebp - 0x1e0]
push 0x50a00804
push dword [0x42a068]
push str.EDIT
push 0x200
call ebx
mov ebx, dword [0x472cec]
mov dword [0x46576c], eax
pop edi
pop eax
push 0
push dword [0x465770]
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 [0x465770]
add esp, 0xc
test byte [0x465798], 0x10
mov dword [0x42a264], eax
mov eax, dword [0x4656a0]
mov dword [0x42a274], eax
jne 0x40dc4d
push eax
push eax
push 0x42a260
push 0
call dword [sym.imp.SHELL32.dll_Shell_NotifyIconA]
test eax, eax
sete al
pop edx
movzx eax, al
or dword [0x465794], eax
pop ecx
sub esp, 0xc
push 0x11
call dword [sym.imp.GDI32.dll_GetStockObject]
add esp, 0xc
push 1
push eax
push 0x30
push dword [0x46576c]
call dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, 0x45c2c0
call fcn.004040ac
mov edx, 1
jmp 0x40ddb2
mov eax, dword [0x45c2c4]
push edi
push edi
push str.__IPv6__r_n
sub eax, 2
push eax
call esi
mov edx, dword [0x45c2c4]
add esp, 0x10
lea eax, [edx + eax - 2]
mov dword [0x45c2c4], eax
jmp 0x40d98e
push ebx
push ebx
push str.Error._Cant_load_TLS_SSL_library_r_n
push dword [0x45c2c4]
call esi
add dword [0x45c2c4], eax
add esp, 0x10
jmp 0x40dad1
sub esp, 0xc
push 5
call fcn.0040d511
mov dword [esp], eax
push dword [0x42a69c]
push 0x43aadf
push dword [0x430fbc]
push dword [0x45c2c4]
mov dword [0x42a478], eax
call esi
add esp, 0x20
add dword [0x45c2c4], eax
test byte [0x4657a0], 0x20
je 0x40dad1
sub esp, 0xc
push 0xf
call fcn.0040d511
add esp, 0x10
test eax, eax
jle 0x40dad1
mov eax, dword [0x45c2c4]
push ebx
push ebx
push str.__IPv6__r_n
sub eax, 2
push eax
call esi
mov edx, dword [0x45c2c4]
lea eax, [edx + eax - 2]
mov dword [0x45c2c4], eax
jmp 0x40dcbe
push edx
push dword [0x4656bc]
push dword [0x430f10]
push dword [0x45c2c4]
call esi
mov word [0x438338], 0
add dword [0x45c2c4], eax
add esp, 0x10
jmp 0x40db12
push eax
push eax
push 0x465300
push 0
push 0
push 0x42393d
push 0x1000
push 0x42a458
call dword [sym.imp.KERNEL32.dll_CreateThread]
sub esp, 0xc
push dword [0x472c8c]
push str.DHCP_enabled.__u_IPs_for_allocate_r_n
push dword [0x45c2c4]
call esi
add esp, 0x20
add dword [0x45c2c4], eax
jmp 0x40db28
lea esp, [ebp - 0xc]
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret