Function at 0x406330
Capabilities:
Get networking parameters

Disassembly:
sub esp, 0x118
lea eax, [esp + 0x14]
push ebx
push ebp
push esi
push edi
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
dec eax
test eax, eax
jle 0x40635e
mov cl, 0x5c
cmp byte [esp + eax + 0x24], cl
je 0x40635e
dec eax
test eax, eax
jg 0x406353
mov byte [esp + eax + 0x24], 0
mov edi, str._sinforIP
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x24]
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x24]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push str.path:_s_n
call fcn.00407a00
add esp, 8
lea ecx, [esp + 0x24]
push ecx
mov ecx, 0x432460
call fcn.00409260
test eax, eax
je 0x4063d3
push str.load_sinforIP_fail_n
call fcn.00407a00
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x118
ret
push 0x248
call fcn.0040ae76
mov ebx, eax
add esp, 4
test ebx, ebx
mov dword [esp + 0x18], ebx
jne 0x406407
push str.Error_allocating_memory_needed_to_call_GetNetworkParams_n
call fcn.00407a00
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x118
ret
lea edx, [esp + 0x1c]
mov dword [esp + 0x1c], 0x248
push edx
push ebx
call sub.iphlpapi.dll_GetNetworkParams
cmp eax, 0x6f
jne 0x40645b
push ebx
call fcn.0040ac20
mov eax, dword [esp + 0x20]
push eax
call fcn.0040ae76
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x406457
push str.Error_allocating_memory_needed_to_call_GetNetworkParams_n
call fcn.00407a00
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x118
ret
mov ebx, dword [esp + 0x18]
lea ecx, [esp + 0x1c]
push ecx
push ebx
call sub.iphlpapi.dll_GetNetworkParams
neg eax
sbb eax, eax
inc eax
mov dword [esp + 0x14], eax
je 0x4065f6
lea edi, [ebx + 0x110]
push edi
push str.DNS:_t_s_n
call fcn.00407a00
mov dl, byte [esp + 0x1b]
sub esp, 8
mov ebp, esp
xor esi, esi
or ecx, 0xffffffff
xor eax, eax
mov byte [ebp], dl
mov dword [ebp + 4], esi
mov dword [ebp + 8], esi
mov dword [ebp + 0xc], esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x24], esp
mov edi, ecx
push 1
push edi
mov ecx, ebp
mov dword [esp + 0x2c], edi
call fcn.004046f0
test al, al
je 0x4064e4
mov ecx, edi
mov edi, dword [ebp + 4]
mov eax, ecx
lea esi, [ebx + 0x110]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 4]
mov dword [ebp + 8], eax
xor esi, esi
mov byte [eax + ecx], 0
call fcn.00405ff0
add esp, 0x10
cmp eax, esi
jne 0x4065a6
mov eax, dword [ebx + 0x10c]
cmp eax, esi
mov dword [esp + 0x14], eax
je 0x4065a6
jmp 0x406512
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
xor esi, esi
add eax, 4
push eax
push str.DNS:_t_s_n
call fcn.00407a00
mov dl, byte [esp + 0x1b]
sub esp, 8
mov ebp, esp
add ebx, 0x110
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
mov byte [ebp], dl
mov dword [ebp + 4], esi
mov dword [ebp + 8], esi
mov dword [ebp + 0xc], esi
mov dword [esp + 0x30], esp
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov ebx, ecx
mov ecx, ebp
push ebx
call fcn.004046f0
test al, al
je 0x406582
mov eax, dword [esp + 0x28]
mov edi, dword [ebp + 4]
mov ecx, ebx
mov edx, ecx
lea esi, [eax + 0x110]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 4]
mov dword [ebp + 8], ebx
mov byte [eax + ebx], 0
call fcn.00405ff0
add esp, 0x10
test eax, eax
jne 0x4065a0
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx]
test eax, eax
mov dword [esp + 0x14], eax
jne 0x406508
mov ebx, dword [esp + 0x18]
xor esi, esi
cmp ebx, esi
je 0x4065b3
push ebx
call fcn.0040ac20
add esp, 4
mov eax, dword [0x43244c]
cmp eax, esi
je 0x4065cc
mov edx, dword [0x432450]
sub edx, eax
test edx, 0xffffffe0
jne 0x4065e9
push str.g_vecDomainAC_empty_n
call fcn.00407a00
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x118
ret
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x118
ret
push 0
push str.GetNetworkParams_failed_with_error:__d_n
call fcn.00407a00
add esp, 8
test ebx, ebx
je 0x406612
push ebx
call fcn.0040ac20
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x118
ret