Function at 0x41cf90
Capabilities:
Create tcp socket
Initialize winsock library
Read .ini file
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x240
mov eax, dword [0x429044]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x240], ecx
mov ecx, dword [ebp - 0x240]
call fcn.0041cde0
movzx eax, al
test eax, eax
jne 0x41cfc5
mov eax, 0xfffffffc
jmp 0x41d24f
mov ecx, 0x202
mov word [ebp - 0x234], cx
lea edx, [ebp - 0x198]
push edx
movzx eax, word [ebp - 0x234]
push eax
call sub.WS2_32.dll_WSAStartup
mov dword [ebp - 0x238], eax
cmp dword [ebp - 0x238], 0
je 0x41d013
push 0x425994
mov ecx, dword [ebp - 0x240]
add ecx, 4
push ecx
call fcn.0040632a
add esp, 8
or eax, 0xffffffff
jmp 0x41d24f
movzx edx, word [ebp - 0x198]
and edx, 0xff
movzx eax, dl
cmp eax, 2
jne 0x41d040
movzx ecx, word [ebp - 0x198]
shr ecx, 8
and ecx, 0xff
movzx edx, cl
cmp edx, 2
je 0x41d05f
push 0x4259a8
mov eax, dword [ebp - 0x240]
add eax, 4
push eax
call fcn.0040632a
add esp, 8
or eax, 0xffffffff
jmp 0x41d24f
push 6
push 1
push 2
call sub.WS2_32.dll_socket
mov dword [ebp - 0x19c], eax
cmp dword [ebp - 0x19c], 0xffffffff
jne 0x41d09a
push 0x4259bc
mov ecx, dword [ebp - 0x240]
add ecx, 4
push ecx
call fcn.0040632a
add esp, 8
mov eax, 0xfffffffe
jmp 0x41d24f
push str.jkmsvc.ini
push 0x80
lea edx, [ebp - 0x230]
push edx
push 0x424d8a
push 0x4259d8
push str.HOST
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [ebp - 0x230]
push eax
call fcn.00405e60
add esp, 4
cmp eax, 1
jae 0x41d184
push 0
call sub.WS2_32.dll_gethostbyname
mov dword [ebp - 0x23c], eax
cmp dword [ebp - 0x23c], 0
je 0x41d157
mov ecx, dword [ebp - 0x23c]
mov edx, dword [ecx + 0xc]
mov eax, dword [edx]
movzx ecx, byte [eax + 3]
push ecx
mov edx, dword [ebp - 0x23c]
mov eax, dword [edx + 0xc]
mov ecx, dword [eax]
movzx edx, byte [ecx + 2]
push edx
mov eax, dword [ebp - 0x23c]
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
movzx eax, byte [edx + 1]
push eax
mov ecx, dword [ebp - 0x23c]
mov edx, dword [ecx + 0xc]
mov eax, dword [edx]
movzx ecx, byte [eax]
push ecx
push str._d._d._d._d
lea edx, [ebp - 0x230]
push edx
call fcn.0040632a
add esp, 0x18
lea eax, [ebp - 0x230]
push eax
push 0x42b0f4
call fcn.00406aa0
add esp, 8
jmp 0x41d184
push 0x4259f0
mov ecx, dword [ebp - 0x240]
add ecx, 4
push ecx
call fcn.0040632a
add esp, 8
mov edx, dword [ebp - 0x19c]
push edx
call sub.WS2_32.dll_closesocket
mov eax, 0xfffffffd
jmp 0x41d24f
mov eax, 2
mov word [ebp - 0x1ac], ax
lea ecx, [ebp - 0x230]
push ecx
call sub.WS2_32.dll_inet_addr
mov dword [ebp - 0x1a8], eax
mov edx, dword [ebp - 0x240]
movzx eax, word [edx + 0x404]
push eax
call sub.WS2_32.dll_htons
mov word [ebp - 0x1aa], ax
push 0x10
lea ecx, [ebp - 0x1ac]
push ecx
mov edx, dword [ebp - 0x19c]
push edx
call sub.WS2_32.dll_bind
cmp eax, 0xffffffff
jne 0x41d200
push 0x425a08
mov eax, dword [ebp - 0x240]
add eax, 4
push eax
call fcn.0040632a
add esp, 8
mov ecx, dword [ebp - 0x19c]
push ecx
call sub.WS2_32.dll_closesocket
mov eax, 0xfffffffc
jmp 0x41d24f
mov edx, dword [ebp - 0x240]
mov eax, dword [ebp - 0x19c]
mov dword [edx], eax
push 0xa
mov ecx, dword [ebp - 0x240]
mov edx, dword [ecx]
push edx
call sub.WS2_32.dll_listen
cmp eax, 0xffffffff
jne 0x41d24d
push 0x425a18
mov eax, dword [ebp - 0x240]
add eax, 4
push eax
call fcn.0040632a
add esp, 8
mov ecx, dword [ebp - 0x19c]
push ecx
call sub.WS2_32.dll_closesocket
mov eax, 0xfffffffb
jmp 0x41d24f
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405e4a
mov esp, ebp
pop ebp
ret