Function at 0x453530
Capabilities:
Query environment variable

Disassembly:
push 0xffffffffffffffff
push 0x4ea018
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 0x51d5ec
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], 0x51d5ec
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 0x453587
test cl, 0x40
je 0x453589
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 0x4535f7
mov word [esp + 0x20], bp
call fcn.00445d10
and edx, 0x7fffffff
push edx
push eax
lea eax, [esp + 0x28]
push eax
call fcn.004a48e0
mov esi, dword [esp + 0x80]
mov ecx, dword [esi]
push ecx
mov eax, 8
mov word [esp + 0x6e], bp
call fcn.00449190
add esp, 0x10
cmp eax, ebp
mov dword [esi], eax
je 0x4535e5
mov word [eax + 6], bp
mov esi, dword [esi]
mov dx, word [esp + 0x20]
mov word [esi], dx
lea ebx, [esi + 2]
jmp 0x453798
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebp, dword [esp + 0x74]
movsx eax, bl
mov dword [esp + 0x14], eax
mov al, byte [esp + 0x13]
test al, al
mov byte [esp + 0x78], 0
jne 0x453628
cmp word [esi], 0x26
je 0x45371f
test bl, bl
jne 0x4536f3
mov ecx, dword [ebp]
push ecx
mov eax, 0xa6
call fcn.00449190
add esp, 4
test eax, eax
mov dword [ebp], eax
je 0x453649
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 0x4536c1
cmp word [esi], 0
jne 0x4536b9
mov edx, dword [ebp]
lea eax, [edi + edi + 0x1a]
push edx
call fcn.00449190
add esp, 4
test eax, eax
mov dword [ebp], eax
je 0x453692
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]
add edi, 0xa
push edi
push eax
mov eax, dword [esp + 0x78]
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, eax
test edi, edi
jg 0x453795
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xcb
jne 0x453791
mov al, byte [esp + 0x78]
test al, al
jne 0x453798
mov al, byte [esp + 0x13]
test al, al
mov byte [esp + 0x78], 1
jne 0x453798
mov edi, dword [esp + 0x70]
mov ecx, dword [esp + 0x18]
push 0xffffffffffffffff
push 0
push edi
call fcn.00423eea
test eax, eax
jne 0x453730
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x453749
mov al, byte [esp + 0x78]
test al, al
jne 0x453749
mov byte [esp + 0x78], 1
jmp 0x453628
add esi, 2
mov dword [esp + 0x70], esi
mov dword [esp + 0x14], 1
jmp 0x4536ef
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 0x453755
mov dword [esp + 0x74], 0
mov esi, dword [esp + 0x74]
mov ecx, dword [ebp]
lea eax, [esi + esi + 6]
push ecx
call fcn.00449190
add esp, 4
test eax, eax
mov dword [ebp], eax
je 0x453773
mov word [eax + esi*2 + 4], 0
mov eax, dword [esp + 0x74]
dec eax
mov esi, dword [ebp]
mov ebx, esi
js 0x453798
inc eax
mov dx, word [edi]
mov word [ebx], dx
add ebx, 2
add edi, 2
dec eax
jne 0x453780
jmp 0x453798
test edi, edi
jle 0x453798
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