Function at 0x5c0410
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x430
mov edi, ecx
lea ecx, [ebp - 0x43c]
push dword [ebp + 8]
call fcn.005d95d0
add esp, 4
cmp dword [ebp - 0x43c], 1
jne 0x5c0490
cmp byte [ebp - 0x438], 3
jne 0x5c0595
mov esi, dword [ebp - 0x434]
mov eax, dword [esi + 4]
push dword [esi]
call dword [eax]
add esp, 4
mov ecx, dword [esi + 4]
cmp dword [ecx + 4], 0
je 0x5c047d
mov eax, dword [esi]
cmp dword [ecx + 8], 9
jb 0x5c0469
mov eax, dword [eax - 4]
push eax
push 0
push dword [0x6f1130]
call sub.KERNEL32.dll_HeapFree
mov esi, dword [ebp - 0x434]
push esi
push 0
push dword [0x6f1130]
call sub.KERNEL32.dll_HeapFree
jmp 0x5c0595
mov eax, dword [ebp - 0x438]
test eax, eax
mov dword [ebp - 0x20], eax
je 0x5c0595
mov eax, dword [ebp - 0x434]
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x30], eax
push 0x400
push 0
lea eax, [ebp - 0x43c]
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov eax, dword [0x6dd42c]
mov esi, 0x200
xor ebx, ebx
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x24], 0
cmp esi, 0x201
jae 0x5c0502
jmp 0x5c0540
cmp edi, esi
mov esi, edi
jb 0x5c05a0
cmp esi, 0x201
jb 0x5c0540
mov ecx, dword [ebp - 0x28]
mov eax, esi
sub eax, ebx
sub ecx, ebx
cmp ecx, eax
jb 0x5c051c
mov edi, dword [ebp - 0x10]
mov ebx, esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x1c], esi
jmp 0x5c054d
lea ecx, [ebp - 0x2c]
mov edx, ebx
push eax
call fcn.005d96d0
add esp, 4
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x10], eax
jmp 0x5c050f
lea edi, [ebp - 0x43c]
mov dword [ebp - 0x1c], 0x200
mov dword [ebp - 0x14], edi
push 0
call sub.KERNEL32.dll_SetLastError
push esi
push edi
push dword [ebp - 0x20]
call sub.KERNEL32.dll_GetEnvironmentVariableW
mov edi, eax
test eax, eax
jne 0x5c0570
call sub.KERNEL32.dll_GetLastError
test eax, eax
jne 0x5c05ce
cmp edi, esi
jne 0x5c04f0
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x7a
jne 0x5c04f0
add esi, esi
cmp esi, 0x201
jb 0x5c0540
jmp 0x5c0502
mov dword [edi], 0
jmp 0x5c0658
mov edx, dword [ebp - 0x1c]
cmp edi, edx
ja 0x5c0689
mov edx, dword [ebp - 0x14]
lea ecx, [ebp - 0x3c]
push edi
call fcn.005c2940
add esp, 4
mov ecx, dword [ebp - 0x3c]
mov edi, dword [ebp - 0x38]
mov esi, dword [ebp - 0x34]
xor ebx, ebx
mov eax, dword [ebp - 0x28]
test eax, eax
jne 0x5c05e0
jmp 0x5c0603
mov bl, 1
call sub.KERNEL32.dll_GetLastError
xor ecx, ecx
mov edi, eax
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x5c0603
cmp dword [ebp - 0x10], 0
je 0x5c0603
and eax, 0x7fffffff
je 0x5c0603
push dword [ebp - 0x10]
push 0
push dword [0x6f1130]
mov dword [ebp - 0x14], ecx
call sub.KERNEL32.dll_HeapFree
mov ecx, dword [ebp - 0x14]
test bl, bl
je 0x5c0663
mov eax, dword [ebp - 0x18]
cmp cl, 3
mov dword [eax], 0
jne 0x5c064f
mov eax, dword [edi + 4]
push dword [edi]
call dword [eax]
add esp, 4
mov ecx, dword [edi + 4]
cmp dword [ecx + 4], 0
je 0x5c0641
mov eax, dword [edi]
cmp dword [ecx + 8], 9
jb 0x5c0633
mov eax, dword [eax - 4]
push eax
push 0
push dword [0x6f1130]
call sub.KERNEL32.dll_HeapFree
push edi
push 0
push dword [0x6f1130]
call sub.KERNEL32.dll_HeapFree
test dword [ebp - 0x30], 0x7fffffff
jne 0x5c0677
add esp, 0x430
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [ebp - 0x18]
mov dword [eax], ecx
mov dword [eax + 4], edi
mov dword [eax + 8], esi
test dword [ebp - 0x30], 0x7fffffff
je 0x5c0658
push dword [ebp - 0x20]
push 0
push dword [0x6f1130]
call sub.KERNEL32.dll_HeapFree
jmp 0x5c0658
mov ecx, edi
push 0x6d5e10
call fcn.0045ab50
add esp, 4
ud2