Function at 0x52bdf0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x438
mov ebx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
lea ecx, [ebp - 0x444]
push dword [ebp + 0x10]
call fcn.00542a80
add esp, 4
mov eax, dword [ebp - 0x444]
test eax, eax
mov dword [ebp - 0x20], eax
je 0x52bf18
mov eax, dword [ebp - 0x440]
mov esi, 0x200
mov dword [ebp - 0x34], 2
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 2
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x24], eax
cmp esi, 0x201
jae 0x52be90
jmp 0x52be7e
jbe 0x52bf6b
cmp esi, 0x201
jae 0x52be90
mov dword [ebp - 0x28], 0x200
lea ebx, [ebp - 0x444]
mov edi, esi
jmp 0x52bec4
mov edi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
sub esi, edi
sub eax, edi
cmp eax, esi
jae 0x52beb5
mov edx, edi
lea ecx, [ebp - 0x34]
push esi
call fcn.005166d0
add esp, 4
mov eax, dword [ebp - 0x34]
mov edi, dword [ebp - 0x30]
mov dword [ebp - 0x18], eax
mov ebx, dword [ebp - 0x18]
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x14], edi
push 0
call sub.KERNEL32.dll_SetLastError
push edi
push ebx
push dword [ebp - 0x20]
call sub.KERNEL32.dll_GetEnvironmentVariableW
mov esi, eax
test eax, eax
jne 0x52bee8
call sub.KERNEL32.dll_GetLastError
test eax, eax
jne 0x52c050
cmp esi, edi
jne 0x52be70
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x7a
jne 0x52c06a
lea esi, [edi + edi]
test edi, edi
mov eax, 0xffffffff
cmovs esi, eax
cmp esi, 0x201
jb 0x52be7e
jmp 0x52be90
cmp byte [ebp - 0x440], 3
jne 0x52bf62
mov edi, dword [ebp - 0x43c]
mov esi, dword [edi + 4]
mov ebx, dword [edi]
mov eax, dword [esi]
push ebx
call eax
add esp, 4
cmp dword [esi + 4], 0
je 0x52bf51
cmp dword [esi + 8], 9
jb 0x52bf43
mov ebx, dword [ebx - 4]
push ebx
push 0
push dword [0x6320d0]
call sub.KERNEL32.dll_HeapFree
push edi
push 0
push dword [0x6320d0]
call sub.KERNEL32.dll_HeapFree
mov ebx, dword [ebp + 8]
mov byte [ebx + 0xc], 2
jmp 0x52c043
mov eax, dword [ebp - 0x28]
cmp esi, eax
ja 0x52c080
lea eax, [ebp - 0x44]
push esi
push ebx
push eax
call fcn.0052f440
add esp, 0xc
mov eax, dword [ebp - 0x3c]
movzx edx, word [ebp - 0x37]
movzx ecx, byte [ebp - 0x35]
mov esi, dword [ebp - 0x44]
mov edi, dword [ebp - 0x40]
movzx ebx, byte [ebp - 0x38]
mov dword [ebp - 0x10], eax
mov word [ebp - 0x1c], dx
mov byte [ebp - 0x1a], cl
cmp dword [ebp - 0x14], 0
je 0x52bfb9
push dword [ebp - 0x18]
push 0
push dword [0x6320d0]
call sub.KERNEL32.dll_HeapFree
cmp bl, 2
jne 0x52c00c
mov ebx, dword [ebp + 8]
mov eax, esi
cmp al, 3
mov byte [ebx + 0xc], 2
jne 0x52c02d
mov eax, edi
mov edi, dword [edi]
mov esi, dword [eax + 4]
mov dword [ebp - 0x14], eax
mov eax, dword [esi]
push edi
call eax
add esp, 4
cmp dword [esi + 4], 0
je 0x52bffa
cmp dword [esi + 8], 9
jb 0x52bfec
mov edi, dword [edi - 4]
push edi
push 0
push dword [0x6320d0]
call sub.KERNEL32.dll_HeapFree
push dword [ebp - 0x14]
push 0
push dword [0x6320d0]
call sub.KERNEL32.dll_HeapFree
jmp 0x52c02d
movzx eax, word [ebp - 0x1c]
mov ecx, dword [ebp + 8]
mov bh, byte [ebp - 0x1a]
mov edx, dword [ebp - 0x10]
mov word [ecx + 0xd], ax
mov byte [ecx + 0xf], bh
mov dword [ecx], esi
mov dword [ecx + 4], edi
mov dword [ecx + 8], edx
mov byte [ecx + 0xc], bl
mov ebx, ecx
cmp dword [ebp - 0x24], 0
je 0x52c043
push dword [ebp - 0x20]
push 0
push dword [0x6320d0]
call sub.KERNEL32.dll_HeapFree
mov eax, ebx
add esp, 0x438
pop esi
pop edi
pop ebx
pop ebp
ret
xor esi, esi
mov bl, 2
call sub.KERNEL32.dll_GetLastError
mov edi, eax
cmp dword [ebp - 0x14], 0
jne 0x52bfa9
jmp 0x52bfb9
push 0x601238
push 0x28
push str.internal_error:_entered_unreachable_codeL
call fcn.004251d0
add esp, 0xc
jmp 0x52c08f
push 0x601228
push eax
push esi
call fcn.004287f0
add esp, 0xc
ud2