Function at 0x504f90
Capabilities:
Query environment variable

Disassembly:
push 0xffffffffffffffff
push 0x5d016c
mov eax, dword fs:[0]
push eax
sub esp, 0x4e4
mov eax, dword [0x65d4e4]
xor eax, esp
mov dword [esp + 0x4e0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x65d4e4]
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 0x5052d4
cmp byte [edi], bl
je 0x5052d4
push 0x3ff
lea eax, [esp + 0xf9]
push ebx
push eax
mov byte [esp + 0x100], bl
call fcn.005b5540
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 0x505033
sub eax, edx
push eax
push edi
lea ecx, [esp + 0xe0]
call fcn.00409790
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 0x505070
sub eax, edx
push eax
push edi
lea ecx, [esp + 0xc4]
call fcn.00409790
lea ecx, [esp + 0xbc]
push ecx
mov byte [esp + 0x504], 1
call fcn.004fc350
add esp, 4
cmp dword [str._CSIDL_WINDOWS_], ebx
mov ebp, 0x658018
je 0x505109
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 0x5050b8
sub eax, esi
push eax
push ebx
push edx
lea ecx, [esp + 0xc8]
call fcn.004264e0
mov esi, eax
cmp esi, 0xffffffff
je 0x5050fd
mov eax, dword [ebp]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x5050e0
sub eax, edx
mov edi, eax
call fcn.0041aef0
mov eax, dword [eax + 0x2c]
cmp eax, ebx
jne 0x505151
mov edi, dword [esp + 0x18]
add ebp, 8
cmp dword [ebp], ebx
jne 0x5050b0
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 0x50520b
lea ecx, [esp + 0xf4]
push ecx
mov ecx, esi
call fcn.0040be30
lea ecx, [esp + 0xbc]
call fcn.0040bf30
lea ecx, [esp + 0xd8]
call fcn.0040bf30
jmp 0x5052ee
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 0x505170
sub eax, edx
push eax
lea edx, [esp + 0xf8]
push edx
push edi
push esi
lea ecx, [esp + 0xe8]
call fcn.005002d0
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.00407e40
mov edi, 0x10
cmp dword [esp + 0xd4], edi
jb 0x5051d4
mov ecx, dword [esp + 0xc0]
push ecx
call fcn.00595eb8
add esp, 4
cmp dword [esp + 0xf0], edi
mov dword [esp + 0xd4], ebp
mov dword [esp + 0xd0], ebx
mov byte [esp + 0xc0], bl
jb 0x5052ee
mov edx, dword [esp + 0xdc]
push edx
call fcn.00595eb8
add esp, 4
jmp 0x5052ee
push 1
push 2
lea ecx, [esp + 0x44]
call fcn.0040b040
lea edx, [esp + 0xd8]
push edx
lea eax, [esp + 0x40]
push str.GetFolderPath:
push eax
mov byte [esp + 0x50c], 2
call fcn.00409b60
add esp, 8
push eax
call fcn.00409240
add esp, 8
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0x40]
call fcn.004094f0
cmp dword [eax + 0x18], 0x10
mov byte [esp + 0x500], 3
jb 0x505264
mov eax, dword [eax + 4]
jmp 0x505267
add eax, 4
push eax
push str.BaseLib::GetFolderPath
push 0xf4e
push str..common_function.cpp
push 0xf0000000
call fcn.00409860
mov ecx, eax
call fcn.004fb930
lea ecx, [esp + 0x20]
call fcn.0040bf30
lea ecx, [esp + 0x88]
mov byte [esp + 0x500], 1
call fcn.00409e00
lea edx, [esp + 0x88]
push edx
mov dword [esp + 0x8c], vtable.std::ios_base.0
call fcn.005cdcde
add esp, 4
lea eax, [esp + 0xd8]
push eax
mov ecx, esi
call fcn.0040bf50
jmp 0x505134
push ebx
mov dword [esi + 0x18], 0xf
mov dword [esi + 0x14], ebx
push 0x62b600
mov ecx, esi
mov byte [esi + 4], bl
call fcn.00409790
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.005b1988
add esp, 0x4f0
ret