Function at 0x4a7950
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov ecx, 8
push 0
push 0
dec ecx
jne 0x4a7958
push ebx
push esi
push edi
mov ebx, eax
xor eax, eax
push ebp
push 0x4a7c12
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [0x503758], 0
je 0x4a798d
mov eax, ebx
mov edx, dword [0x503758]
call fcn.004049b4
jmp 0x4a7be2
call fcn.004a86cc
mov eax, dword [0x503788]
mov edx, dword [eax]
call dword [edx + 0x14]
test eax, eax
jne 0x4a79b1
mov eax, ebx
mov edx, 0x4a7c28
call fcn.004049b4
jmp 0x4a7b98
lea edx, [ebp - 0x28]
mov eax, 0x4a7c40
call fcn.004a763c
mov eax, dword [ebp - 0x28]
lea edx, [ebp - 0xc]
call fcn.004093d4
cmp dword [ebp - 0xc], 0
jne 0x4a79dd
lea eax, [ebp - 0xc]
mov edx, dword [0x503764]
call fcn.004049f8
mov byte [0x503768], 0
lea eax, [ebp - 0x14]
call fcn.00404960
lea eax, [ebp - 8]
call fcn.00404960
mov eax, ebx
call fcn.00404960
lea eax, [ebp - 0x20]
mov edx, 0x2710
call fcn.00404fbc
mov eax, dword [ebp - 0x20]
call fcn.00404c30
push eax
mov eax, dword [ebp - 0x20]
call fcn.00404e30
push eax
push 0x4a7c4c
call sub.kernel32.dll_GetEnvironmentVariableA
mov edx, eax
lea eax, [ebp - 0x20]
call fcn.00404fbc
lea edx, [ebp - 0x2c]
mov eax, dword [ebp - 0x20]
call fcn.004093d4
mov edx, dword [ebp - 0x2c]
lea eax, [ebp - 0x20]
call fcn.004049f8
mov eax, dword [ebp - 0x20]
call fcn.00404c30
mov dword [ebp - 0x1c], eax
mov eax, dword [0x503788]
mov edx, dword [eax]
call dword [edx + 0x14]
dec eax
test eax, eax
jl 0x4a7b61
inc eax
mov dword [ebp - 0x24], eax
xor esi, esi
mov edx, esi
mov eax, dword [0x503788]
mov ecx, dword [eax]
call dword [ecx + 0x18]
mov dword [ebp - 0x18], eax
lea ecx, [ebp - 4]
mov edx, esi
mov eax, dword [0x503788]
mov edi, dword [eax]
call dword [edi + 0xc]
cmp dword [ebp - 0x18], 0
jl 0x4a7aa9
lea edx, [ebp - 0x30]
mov eax, dword [ebp - 0x18]
call fcn.00409afc
mov ecx, dword [ebp - 0x30]
lea eax, [ebp - 8]
mov edx, 0x4a7c5c
call fcn.00404c7c
jmp 0x4a7ab9
lea eax, [ebp - 8]
mov ecx, dword [ebp - 4]
mov edx, 0x4a7c7c
call fcn.00404c7c
lea edx, [ebp - 0x34]
mov eax, dword [ebp - 4]
call fcn.004093d4
mov eax, dword [ebp - 0x34]
push eax
lea edx, [ebp - 0x38]
mov eax, dword [ebp - 0xc]
call fcn.004093d4
mov edx, dword [ebp - 0x38]
pop eax
call fcn.00404d7c
jne 0x4a7af5
mov eax, ebx
mov edx, dword [ebp - 8]
call fcn.004049b4
lea eax, [ebp - 0x14]
mov edx, dword [ebp - 4]
call fcn.004049f8
jmp 0x4a7b61
lea eax, [ebp - 0x10]
push eax
mov ecx, 0x4a7c9c
mov edx, dword [ebp - 8]
mov eax, 0x80000002
call fcn.004a771c
cmp dword [ebp - 0x10], 0
je 0x4a7b57
lea eax, [ebp - 0x10]
mov edx, 0x4a7cb0
call fcn.004a7898
lea edx, [ebp - 0x3c]
mov eax, dword [ebp - 0x10]
call fcn.004093d4
mov eax, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x20]
call fcn.00404f74
mov edi, eax
test edi, edi
jle 0x4a7b57
cmp edi, dword [ebp - 0x1c]
jge 0x4a7b57
mov eax, ebx
mov edx, dword [ebp - 8]
call fcn.004049b4
lea eax, [ebp - 0x14]
mov edx, dword [ebp - 4]
call fcn.004049f8
mov dword [ebp - 0x1c], edi
inc esi
dec dword [ebp - 0x24]
jne 0x4a7a68
cmp dword [ebx], 0
jne 0x4a7b7b
mov eax, ebx
mov edx, dword [ebp - 8]
call fcn.004049b4
lea eax, [ebp - 0x14]
mov edx, dword [ebp - 4]
call fcn.004049f8
cmp dword [0x503764], 0
jne 0x4a7b98
mov byte [0x503768], 1
mov eax, 0x503764
mov edx, dword [ebp - 0x14]
call fcn.004049b4
lea eax, [ebp - 0x10]
push eax
mov edx, dword [ebx]
mov ecx, 0x4a7c9c
mov eax, 0x80000002
call fcn.004a771c
cmp dword [ebp - 0x10], 0
je 0x4a7bcf
lea eax, [ebp - 0x40]
mov ecx, 0x4a7cbc
mov edx, dword [ebp - 0x10]
call fcn.00404c7c
mov eax, dword [ebp - 0x40]
call fcn.004a74fc
test al, al
jne 0x4a7bd6
mov eax, ebx
call fcn.00404960
mov eax, 0x503758
mov edx, dword [ebx]
call fcn.004049b4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4a7c19
lea eax, [ebp - 0x40]
mov edx, 7
call fcn.00404984
lea eax, [ebp - 0x20]
call fcn.00404960
lea eax, [ebp - 0x14]
mov edx, 5
call fcn.00404984
ret