Function at 0x402ad0
Capabilities:
Print debug messages
Set socket configuration

Disassembly:
push 0xffffffffffffffff
push 0x4c57d8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x28
push edi
push str.COSgwConf::Load________
push 0x4e8168
push 0xf
push 0x4fe0bc
call fcn.0040c000
add esp, 0x10
lea ecx, [esp + 0x14]
call fcn.00443060
mov eax, dword [esp + 0x40]
push 0x20019
xor edi, edi
push eax
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [esp + 0x20]
mov dword [esp + 0x40], edi
call fcn.004431d0
test eax, eax
jne 0x402b74
push str.open_reg_error._n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push str.COSgwConf::Load_____
push 0x4e8168
push 0xf
push 0x4fe0bc
call fcn.0040c000
add esp, 0x10
lea ecx, [esp + 0x14]
mov dword [esp + 0x34], 0xffffffff
call fcn.00443150
xor eax, eax
pop edi
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
add esp, 0x34
ret
push esi
lea ecx, [esp + 0x44]
push str.SGW_ENABLE
push ecx
lea ecx, [esp + 0x20]
xor esi, esi
call fcn.00443800
mov eax, dword [esp + 0x44]
mov byte [esp + 0x38], 1
mov ecx, dword [eax - 8]
cmp ecx, edi
je 0x402ea8
push ebp
push 0x4e8c64
push eax
call fcn.00418d4c
mov ebp, dword [esp + 0x4c]
add esp, 8
neg eax
sbb eax, eax
lea edx, [esp + 0x44]
inc eax
push str.SGW_SCDT_ENABLE
push edx
lea ecx, [esp + 0x24]
mov dword [ebp], eax
call fcn.00443800
push eax
lea ecx, [esp + 0x4c]
mov byte [esp + 0x40], 2
call fcn.004ab5ee
lea ecx, [esp + 0x44]
mov byte [esp + 0x3c], 1
call fcn.004ab4b5
mov eax, dword [esp + 0x48]
cmp dword [eax - 8], edi
je 0x402c0b
push 0x4e8c64
push eax
call fcn.00418d4c
add esp, 8
test eax, eax
jne 0x402c0b
mov dword [ebp], 1
mov eax, dword [ebp]
push eax
push str.COSgwConf::Load_1___d_
push 0x4e8168
push 0xf
push 0x4fe0bc
call fcn.0040c000
add esp, 0x14
lea ecx, [esp + 0x14]
push str.SGW_SEND_INTERVAL
push ecx
lea ecx, [esp + 0x24]
call fcn.00443800
push edi
lea ecx, [esp + 0x18]
mov byte [esp + 0x40], 3
call fcn.004ab8e5
push eax
call fcn.00418c87
add esp, 4
cmp eax, edi
mov dword [ebp + 4], eax
jne 0x402c63
mov dword [ebp + 4], 0x1e
jmp 0x402c6f
cmp eax, 0xa
jae 0x402c6f
mov dword [ebp + 4], 0xa
mov edx, dword [ebp + 4]
push ebx
push edx
push str.COSgwConf::Load_2___d_
push 0x4e8168
push 0xf
push 0x4fe0bc
call fcn.0040c000
add esp, 0x14
lea eax, [esp + 0x48]
lea ecx, [esp + 0x20]
push str.SGW_IP_LIST
push eax
call fcn.00443800
mov eax, dword [eax]
lea ecx, [esp + 0x10]
push eax
mov byte [esp + 0x44], 4
call fcn.0042b380
lea ecx, [esp + 0x48]
mov byte [esp + 0x40], 6
call fcn.004ab4b5
lea ecx, [esp + 0x28]
call fcn.004366e0
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x28]
push ecx
push 0x4e8bd0
push edx
mov byte [esp + 0x4c], 7
call fcn.00449250
add esp, 0xc
lea esi, [ebp + 8]
mov ecx, esi
push 0xffffffffffffffff
push edi
call fcn.004a9c8b
cmp dword [esp + 0x2c], edi
jle 0x402d2e
lea eax, [esp + 0x1c]
push edi
push eax
lea ecx, [esp + 0x30]
call fcn.00402fb0
mov eax, dword [eax]
push eax
call sub.WSOCK32.dll_inet_addr
lea ecx, [esp + 0x1c]
mov ebx, eax
call fcn.0042bd30
mov eax, dword [esi + 8]
push ebx
push eax
mov ecx, esi
call fcn.004a9e4f
mov eax, dword [esp + 0x2c]
inc edi
cmp edi, eax
jl 0x402cf7
lea ecx, [esp + 0x1c]
push str.SGW_SCDT_IP_LIST
push ecx
lea ecx, [esp + 0x28]
call fcn.00443800
mov eax, dword [eax]
lea ecx, [esp + 0x10]
push eax
mov byte [esp + 0x44], 8
call fcn.0042bff0
lea ecx, [esp + 0x1c]
mov byte [esp + 0x40], 7
call fcn.004ab4b5
push 0xffffffffffffffff
push 0
lea ecx, [esp + 0x30]
call fcn.004367b0
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x28]
push edx
push 0x4e8bd0
push eax
call fcn.00449250
mov eax, dword [esp + 0x38]
add esp, 0xc
xor edi, edi
test eax, eax
jle 0x402dc5
lea ecx, [esp + 0x1c]
push edi
push ecx
lea ecx, [esp + 0x30]
call fcn.00402fb0
mov eax, dword [eax]
push eax
call sub.WSOCK32.dll_inet_addr
lea ecx, [esp + 0x1c]
mov ebx, eax
call fcn.0042bd30
mov eax, dword [esi + 8]
push ebx
push eax
mov ecx, esi
call fcn.004a9e4f
mov eax, dword [esp + 0x2c]
inc edi
cmp edi, eax
jl 0x402d8e
mov eax, dword [ebp + 0x10]
dec eax
test eax, eax
jl 0x402dff
lea ebx, [eax - 1]
cmp eax, 1
mov edx, ebx
jl 0x402df9
mov ecx, dword [ebp + 0xc]
mov edi, dword [ecx + eax*4]
lea ecx, [ecx + eax*4 - 4]
cmp dword [ecx], edi
je 0x402def
dec edx
sub ecx, 4
test edx, edx
jge 0x402de1
jmp 0x402df9
push 1
push eax
mov ecx, esi
call fcn.004a9f08
mov eax, ebx
test eax, eax
jge 0x402dcd
lea edx, [esp + 0x14]
push str.SGW_MAX_OFFLINE
push edx
lea ecx, [esp + 0x28]
call fcn.00443800
push 0
lea ecx, [esp + 0x18]
mov byte [esp + 0x44], 9
call fcn.004ab8e5
push eax
call fcn.00418c87
add esp, 4
cmp eax, 0x12c
mov dword [ebp + 0x1c], eax
pop ebx
jae 0x402e3d
mov dword [ebp + 0x1c], 0x12c
mov eax, dword [ebp + 0x1c]
push eax
push str.COSgwConf::Load_4___d_
push 0x4e8168
push 0xf
push 0x4fe0bc
call fcn.0040c000
add esp, 0x14
lea ecx, [esp + 0x10]
mov esi, 1
mov byte [esp + 0x3c], 7
call fcn.004ab4b5
lea ecx, [esp + 0x24]
mov byte [esp + 0x3c], 6
call fcn.004366f0
lea ecx, [esp + 0xc]
mov byte [esp + 0x3c], 3
call fcn.0042bd30
lea ecx, [esp + 0x14]
mov byte [esp + 0x3c], 1
call fcn.004ab4b5
lea ecx, [esp + 0x48]
mov byte [esp + 0x3c], 0
call fcn.004ab4b5
pop ebp
jmp 0x402eb6
lea ecx, [esp + 0x44]
mov byte [esp + 0x38], 0
call fcn.004ab4b5
lea ecx, [esp + 0x18]
call fcn.00443220
push str.COSgwConf::Load___
push 0x4e8168
push 0xf
push 0x4fe0bc
call fcn.0040c000
add esp, 0x10
lea ecx, [esp + 0x18]
mov dword [esp + 0x38], 0xffffffff
call fcn.00443150
mov ecx, dword [esp + 0x30]
mov eax, esi
pop esi
pop edi
mov dword fs:[0], ecx
add esp, 0x34
ret