Function at 0x4537e0
Capabilities:
Initialize winsock library
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4a0
mov eax, dword [0x4c0120]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x5086b8], 0
push ebx
push esi
push edi
mov dword [ebp - 0x498], 0
jne 0x453b86
mov esi, dword [sym.imp.WS2_32.dll_WSAStartup]
lea eax, [ebp - 0x494]
push eax
push 2
mov byte [0x508ca0], 0
mov byte [0x508d20], 0
call esi
test eax, eax
je 0x453856
lea ecx, [ebp - 0x494]
push ecx
push 0x101
call esi
test eax, eax
je 0x453856
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00455bf8
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.WS2_32.dll_WSAEnumProtocolsA]
lea edx, [ebp - 0x498]
push edx
push 0
push 0
call esi
cmp eax, 0xffffffff
jne 0x45395f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2747
jne 0x45395f
mov eax, dword [ebp - 0x498]
push eax
call dword [sym.imp.MSVCR80.dll_malloc]
mov ebx, eax
add esp, 4
test ebx, ebx
mov dword [ebp - 0x4a0], ebx
je 0x453842
lea ecx, [ebp - 0x498]
push ecx
push ebx
push 0
call esi
cmp eax, 0xffffffff
je 0x453951
test eax, eax
jle 0x453951
mov dword [ebp - 0x49c], eax
cmp dword [ebx + 0x4c], 2
jne 0x453938
cmp dword [ebx + 0x5c], 6
jne 0x4538fd
cmp dword [0x5086bc], 0
jne 0x4538fd
test dword [ebx], 0x2000
je 0x4538fd
push 0x174
call dword [sym.imp.MSVCR80.dll_malloc]
mov ecx, 0x5d
mov esi, ebx
mov edi, eax
mov dword [0x5086bc], eax
add esp, 4
rep movsd dword es:[edi], dword [esi]
cmp dword [ebx + 0x4c], 2
jne 0x453938
cmp dword [ebx + 0x5c], 0x11
jne 0x453938
cmp dword [0x5086c0], 0
jne 0x453938
test dword [ebx], 0x2000
je 0x453938
push 0x174
call dword [sym.imp.MSVCR80.dll_malloc]
mov ecx, 0x5d
mov esi, ebx
mov edi, eax
mov dword [0x5086c0], eax
add esp, 4
rep movsd dword es:[edi], dword [esi]
add ebx, 0x174
sub dword [ebp - 0x49c], 1
jne 0x4538c2
mov ebx, dword [ebp - 0x4a0]
mov esi, dword [sym.imp.MSVCR80.dll_free]
push ebx
call esi
add esp, 4
jmp 0x453965
mov esi, dword [sym.imp.MSVCR80.dll_free]
cmp dword [0x5086bc], 0
je 0x453b7c
mov edi, dword [sym.imp.MSVCR80.dll_getenv]
push str.QOSENABLE
call edi
add esp, 4
test eax, eax
je 0x45398f
call fcn.00453770
test eax, eax
jne 0x4539c0
mov eax, dword [0x5086bc]
test eax, eax
je 0x4539a8
push eax
call esi
add esp, 4
mov dword [0x5086bc], 0
mov eax, dword [0x5086c0]
test eax, eax
je 0x4539c5
push eax
call esi
add esp, 4
xor eax, eax
mov dword [0x5086c0], eax
jmp 0x4539c5
mov eax, dword [0x5086c0]
cmp dword [0x5086bc], 0
je 0x453b7c
test eax, eax
je 0x453b7c
push str.QOSAPPNAME
call edi
add esp, 4
test eax, eax
je 0x453a07
push str.QOSAPPNAME
call edi
add esp, 4
mov edx, 0x508ca0
mov cl, byte [eax]
mov byte [edx], cl
add eax, 1
add edx, 1
test cl, cl
jne 0x4539f7
jmp 0x453a1d
mov edx, dword [str.SAP_R_3]
mov eax, dword [0x46b4e8]
mov dword [0x508ca0], edx
mov dword [0x508ca4], eax
push str.QOSPOLICYLOCATOR
call edi
add esp, 4
test eax, eax
je 0x453a53
push str.QOSPOLICYLOCATOR
call edi
add esp, 4
mov edx, 0x508d20
lea ebx, [ebx]
mov cl, byte [eax]
mov byte [edx], cl
add eax, 1
add edx, 1
test cl, cl
jne 0x453a40
jmp 0x453b48
push 0x46ab30
push str.APPSAP_R3_VER_s
push 0x508d20
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 0xc
push 0x100
lea ecx, [ebp - 0x204]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x453b48
lea edx, [ebp - 0x304]
push edx
lea eax, [ebp - 0x104]
push eax
push 0
lea ecx, [ebp - 0x204]
push 0
push ecx
call dword [sym.imp.MSVCR80.dll__splitpath]
lea eax, [ebp - 0x304]
add esp, 0x14
mov edx, eax
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x453ab1
lea edi, [ebp - 0x104]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x453ac5
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
mov eax, 0x508d20
rep movsb byte es:[edi], byte [esi]
add eax, 0xffffffff
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x453ae7
mov edx, dword [str._SAPP]
mov cx, word [0x46b4b8]
mov dword [eax], edx
mov dl, byte [0x46b4ba]
mov word [eax + 4], cx
mov byte [eax + 6], dl
lea eax, [ebp - 0x104]
mov ecx, eax
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x453b15
mov edi, 0x508d20
sub eax, ecx
mov esi, ecx
add edi, 0xffffffff
lea ebx, [ebx]
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x453b30
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, 0xd
push 0x508d20
push 0x508ca0
mov dword [0x4bf904], eax
mov dword [0x4bf924], eax
call fcn.00453610
mov ecx, dword [eax + 4]
add esp, 8
mov dword [0x5086c4], eax
mov dword [0x4bf930], ecx
mov dword [0x4bf934], eax
mov dword [0x5086b8], 1
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.00455bf8
mov esp, ebp
pop ebp
ret