Function at 0x416590
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x20c
push ebx
mov bx, word [esp + 0x224]
neg bx
push ebp
mov ebp, dword [esp + 0x220]
sbb ebx, ebx
push esi
mov al, byte [ebp]
and ebx, 0xfffffffe
add ebx, 4
push edi
test al, al
mov dword [esp + 0x18], 0
je 0x4165e6
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x24]
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]
push str.NSP_CONTACT_NUM_SERVERS
mov byte [ebp], 0
call dword [sym.imp.MSVCR70.dll_getenv]
add esp, 4
test eax, eax
je 0x41660e
jbe 0x41660e
push eax
call dword [sym.imp.MSVCR70.dll_atoi]
add esp, 4
mov dword [esp + 0x10], eax
jmp 0x416616
mov dword [esp + 0x10], 0xa
mov ecx, 0x55
xor eax, eax
lea edi, [esp + 0xc8]
lea edx, [esp + 0x10]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x22c]
lea eax, [esp + 0xc8]
push ecx
mov ecx, dword [esp + 0x228]
push edx
push eax
push ecx
push ebx
call fcn.004190c0
test ax, ax
jne 0x41679d
cmp word [esp + 0x10], ax
mov dword [esp + 0x14], 0x46
mov dword [esp + 0x20], 0
jbe 0x4167d1
mov ebx, dword [sym.imp.MSVCR70.dll_sprintf]
lea esi, [esp + 0xc8]
mov dword [esp + 0x1c], esi
cmp word [esi + 0x20], 0
jbe 0x416777
mov ecx, 0x10
xor eax, eax
mov edi, ebp
lea edx, [esp + 0x64]
push str._ninside_licthruen__consrvr_set
push edx
rep stosd dword es:[edi], eax
mov dword [esp + 0x20], 0
call ebx
mov eax, dword [esp + 0x228]
push esi
push eax
call fcn.00415ac0
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
push str._ninside_licthruen__consrvr_set
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea eax, [esp + 0x78]
mov edx, ecx
mov esi, edi
mov edi, ebp
push eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call ebx
lea ecx, [esp + 0x7c]
push str._ninside_licthruen__consrvr_set
push ecx
call ebx
mov esi, dword [sym.imp.MSVCR70.dll__stricmp]
lea edx, [esp + 0x44]
push str.SP_ALL_MODE
push edx
call esi
add esp, 0x28
test eax, eax
je 0x416719
lea eax, [esp + 0x24]
push str.SP_BROADCAST_MODE
push eax
call esi
add esp, 8
test eax, eax
jne 0x416732
push str.SP_LOCAL_MODE
push ebp
call esi
add esp, 8
test eax, eax
jne 0x416732
mov dword [esp + 0x18], 1
jmp 0x416773
mov ecx, dword [esp + 0x230]
mov edx, dword [esp + 0x22c]
mov eax, dword [esp + 0x224]
push ecx
mov ecx, dword [esp + 0x224]
push edx
push ebp
push eax
push ecx
call fcn.00415f40
add esp, 0x14
mov dword [esp + 0x14], eax
test ax, ax
je 0x416799
lea edx, [esp + 0x64]
push str._ninside_licthruen__consrvr_set
push edx
call ebx
add esp, 8
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x10]
inc eax
and ecx, 0xffff
add esi, 0x22
cmp eax, ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], esi
jl 0x41667e
mov eax, dword [esp + 0x14]
cmp ax, 0x45
jne 0x4167b2
pop edi
pop esi
pop ebp
mov ax, 3
pop ebx
add esp, 0x20c
ret
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x4167d5
cmp word [esp + 0x10], 1
jne 0x4167d5
pop edi
pop esi
pop ebp
mov ax, 3
pop ebx
add esp, 0x20c
ret
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20c
ret