Function at 0x50c910
Capabilities:
Query environment variable

Disassembly:
push 0xffffffffffffffff
push 0x5db6ac
mov eax, dword fs:[0]
push eax
sub esp, 0x4e4
mov eax, dword [0x66d4f4]
xor eax, esp
mov dword [esp + 0x4e0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x66d4f4]
xor eax, esp
push eax
lea eax, [esp + 0x4f8]
mov dword fs:[0], eax
mov edi, dword [esp + 0x50c]
mov esi, dword [esp + 0x508]
xor ebx, ebx
cmp edi, ebx
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], ebx
je 0x50cc54
cmp byte [edi], bl
je 0x50cc54
push 0x3ff
lea eax, [esp + 0xf9]
push ebx
push eax
mov byte [esp + 0x100], bl
call fcn.005c0cf0
mov ebp, 0xf
mov eax, edi
add esp, 0xc
mov dword [esp + 0xf0], ebp
mov dword [esp + 0xec], ebx
mov byte [esp + 0xdc], bl
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x50c9b3
sub eax, edx
push eax
push edi
lea ecx, [esp + 0xe0]
call fcn.00408ea0
mov eax, edi
mov dword [esp + 0x500], ebx
mov dword [esp + 0xd4], ebp
mov dword [esp + 0xd0], ebx
mov byte [esp + 0xc0], bl
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x50c9f0
sub eax, edx
push eax
push edi
lea ecx, [esp + 0xc4]
call fcn.00408ea0
lea ecx, [esp + 0xbc]
push ecx
mov byte [esp + 0x504], 1
call fcn.00510370
add esp, 4
cmp dword [str._CSIDL_WINDOWS_], ebx
mov ebp, 0x668008
je 0x50ca89
mov edi, edi
mov edx, dword [ebp]
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x50ca38
sub eax, esi
push eax
push ebx
push edx
lea ecx, [esp + 0xc8]
call fcn.00425830
mov esi, eax
cmp esi, 0xffffffff
je 0x50ca7d
mov eax, dword [ebp]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x50ca60
sub eax, edx
mov edi, eax
call fcn.0041ac50
mov eax, dword [eax + 0x2c]
cmp eax, ebx
jne 0x50cad1
mov edi, dword [esp + 0x18]
add ebp, 8
cmp dword [ebp], ebx
jne 0x50ca30
mov esi, dword [esp + 0x14]
push 0x3ff
lea eax, [esp + 0xf8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
je 0x50cb8b
lea ecx, [esp + 0xf4]
push ecx
mov ecx, esi
call fcn.0040b540
lea ecx, [esp + 0xbc]
call fcn.0040b640
lea ecx, [esp + 0xd8]
call fcn.0040b640
jmp 0x50cc6e
mov ecx, dword [ebp + 4]
lea edx, [esp + 0xf4]
push edx
push ebx
push ebx
push ecx
push ebx
call eax
lea eax, [esp + 0xf4]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x50caf0
sub eax, edx
push eax
lea edx, [esp + 0xf8]
push edx
push edi
push esi
lea ecx, [esp + 0xe8]
call fcn.00507c50
mov esi, dword [esp + 0x14]
push 0xffffffffffffffff
push ebx
lea eax, [esp + 0xe0]
mov ebp, 0xf
mov dword [esi + 0x18], ebp
mov dword [esi + 0x14], ebx
push eax
mov ecx, esi
mov byte [esi + 4], bl
call fcn.00407630
mov edi, 0x10
cmp dword [esp + 0xd4], edi
jb 0x50cb54
mov ecx, dword [esp + 0xc0]
push ecx
call fcn.005a1b1d
add esp, 4
cmp dword [esp + 0xf0], edi
mov dword [esp + 0xd4], ebp
mov dword [esp + 0xd0], ebx
mov byte [esp + 0xc0], bl
jb 0x50cc6e
mov edx, dword [esp + 0xdc]
push edx
call fcn.005a1b1d
add esp, 4
jmp 0x50cc6e
push 1
push 2
lea ecx, [esp + 0x44]
call fcn.0040a750
lea edx, [esp + 0xd8]
push edx
lea eax, [esp + 0x40]
push str.GetFolderPath:
push eax
mov byte [esp + 0x50c], 2
call fcn.00409270
add esp, 8
push eax
call fcn.00408950
add esp, 8
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0x40]
call fcn.00408c00
cmp dword [eax + 0x18], 0x10
mov byte [esp + 0x500], 3
jb 0x50cbe4
mov eax, dword [eax + 4]
jmp 0x50cbe7
add eax, 4
push eax
push str.BaseLib::GetFolderPath
push 0xedd
push str..common_function.cpp
push 0xf0000000
call fcn.00408f70
mov ecx, eax
call fcn.00512650
lea ecx, [esp + 0x20]
call fcn.0040b640
lea ecx, [esp + 0x88]
mov byte [esp + 0x500], 1
call fcn.00409510
lea edx, [esp + 0x88]
push edx
mov dword [esp + 0x8c], vtable.std::ios_base.0
call fcn.005d9cc4
add esp, 4
lea eax, [esp + 0xd8]
push eax
mov ecx, esi
call fcn.0040b660
jmp 0x50cab4
push ebx
mov dword [esi + 0x18], 0xf
mov dword [esi + 0x14], ebx
push 0x63a990
mov ecx, esi
mov byte [esi + 4], bl
call fcn.00408ea0
mov eax, esi
mov ecx, dword [esp + 0x4f8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x4e0]
xor ecx, esp
call fcn.005bd2d7
add esp, 0x4f0
ret