Function at 0x4524d0
Capabilities:
Query environment variable

Disassembly:
push 0xffffffffffffffff
push 0x4e5dc8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x50
push ebx
push ebp
push esi
push edi
mov esi, ecx
push 0x5194ec
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], 0x5194ec
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [esp + 0x78]
mov bl, byte [esi + 0xb]
xor ebp, ebp
cmp ecx, ebp
setl al
and bl, 0x11
test al, al
mov dword [esp + 0x68], ebp
mov byte [esp + 0x13], al
jne 0x452527
test cl, 0x40
je 0x452529
xor bl, bl
mov esi, dword [esp + 0x70]
push str.RANDOM
mov edi, esi
push esi
mov dword [esp + 0x78], edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x4525a9
mov word [esp + 0x20], bp
call fcn.00441790
and edx, 0x7fffffff
push edx
push eax
push str._I64u
lea eax, [esp + 0x2c]
push 0x28
push eax
call fcn.004c1f3f
add esp, 0x14
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, dword [esp + 0x74]
mov edx, dword [esi]
push edx
mov eax, 8
mov word [esp + 0x62], bp
call fcn.00445f60
add esp, 4
cmp eax, ebp
mov dword [esi], eax
je 0x452597
mov word [eax + 6], bp
mov esi, dword [esi]
mov ax, word [esp + 0x20]
mov word [esi], ax
lea ebx, [esi + 2]
jmp 0x45274a
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov al, byte [esp + 0x13]
test al, al
mov ebp, dword [esp + 0x74]
movsx ecx, bl
mov byte [esp + 0x78], 0
mov dword [esp + 0x14], ecx
jne 0x4525da
cmp word [esi], 0x26
je 0x4526d1
test bl, bl
jne 0x4526a5
mov edx, dword [ebp]
push edx
mov eax, 0xa6
call fcn.00445f60
add esp, 4
test eax, eax
mov dword [ebp], eax
je 0x4525fb
mov word [eax + 0xa4], 0
mov esi, dword [ebp]
push 0
mov ebx, esi
mov word [esi], 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp]
push 0x50
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, eax
test edi, edi
jle 0x452673
cmp word [esi], 0
jne 0x45266b
mov ecx, dword [ebp]
lea eax, [edi + edi + 0x1a]
push ecx
call fcn.00445f60
add esp, 4
test eax, eax
mov dword [ebp], eax
je 0x452644
mov word [eax + edi*2 + 0x18], 0
mov esi, dword [ebp]
push 0
mov ebx, esi
mov word [esi], 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp]
mov edx, dword [esp + 0x70]
add edi, 0xa
push edi
push eax
push edx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, eax
test edi, edi
jg 0x452747
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xcb
jne 0x452743
mov al, byte [esp + 0x78]
test al, al
jne 0x45274a
mov al, byte [esp + 0x13]
test al, al
mov byte [esp + 0x78], 1
jne 0x45274a
mov edi, dword [esp + 0x70]
mov ecx, dword [esp + 0x18]
push 0xffffffffffffffff
push 0
push edi
call fcn.00422a90
test eax, eax
jne 0x4526e2
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x4526fb
mov al, byte [esp + 0x78]
test al, al
jne 0x4526fb
mov byte [esp + 0x78], 1
jmp 0x4525da
add esi, 2
mov dword [esp + 0x70], esi
mov dword [esp + 0x14], 1
jmp 0x4526a1
mov eax, dword [eax]
push eax
mov dword [esp + 0x74], eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, dword [esp + 0x70]
mov esi, eax
mov dword [esp + 0x74], esi
jmp 0x452707
mov dword [esp + 0x74], 0
mov esi, dword [esp + 0x74]
mov ecx, dword [ebp]
lea eax, [esi + esi + 6]
push ecx
call fcn.00445f60
add esp, 4
test eax, eax
mov dword [ebp], eax
je 0x452725
mov word [eax + esi*2 + 4], 0
mov eax, dword [esp + 0x74]
dec eax
mov esi, dword [ebp]
mov ebx, esi
js 0x45274a
inc eax
mov dx, word [edi]
mov word [ebx], dx
add ebx, 2
add edi, 2
dec eax
jne 0x452732
jmp 0x45274a
test edi, edi
jle 0x45274a
lea ebx, [esi + edi*2]
mov eax, dword [esp + 0x1c]
push eax
mov word [ebx], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x60]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x5c
ret 0xc