Function at 0x5daae0
Capabilities:
Query environment variable

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x81d4c8
push eax
mov dword fs:[0], esp
sub esp, 0x1c
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov eax, dword [edi]
call dword [eax + 8]
test al, al
jne 0x5dad9c
mov eax, dword [edi + 0x38]
test eax, eax
je 0x5dab29
push 0x146
push str.C:ReposBvSrcNoCrtLibdatavect.h
push 0x8fcf74
call fcn.006d2b10
add esp, 0xc
mov eax, dword [edi + 0x40]
test al, 1
je 0x5dab31
dec eax
test eax, eax
jne 0x5dab96
mov esi, dword [esp + 0x3c]
or edi, 0xffffffff
mov ecx, esi
call fcn.00404e60
mov eax, dword [esi + 8]
cmp eax, 0xffffffff
jae 0x5dab55
mov edi, eax
test edi, edi
jbe 0x5dad9c
mov ecx, esi
call fcn.00404cb0
mov eax, dword [esi + 4]
mov ecx, dword [esi + 8]
sub ecx, edi
lea edx, [eax + edi*2]
push ecx
push edx
push eax
call fcn.00403320
mov ebp, dword [esi + 8]
add esp, 0xc
sub ebp, edi
mov ecx, esi
push 0
push ebp
call fcn.00404d30
test al, al
je 0x5dad9c
push ebp
mov ecx, esi
call fcn.00404c90
jmp 0x5dad9c
shr eax, 1
mov ebx, eax
mov eax, dword [edi + 0x38]
test eax, eax
je 0x5dabb8
push 0x141
push str.C:ReposBvSrcNoCrtLibdatavect.h
push 0x8fcf74
call fcn.006d2b10
add esp, 0xc
mov esi, dword [edi + 0x3c]
mov dword [esp + 0x18], esi
cmp word [esi + ebx*2 - 2], 0
je 0x5dac05
lea eax, [edi + 4]
mov dword [edi + 0x18], 0xd
test eax, eax
je 0x5dabda
lea ebx, [eax + 4]
jmp 0x5dabdc
xor ebx, ebx
push str.RegQueryValueExW__
call fcn.007ac4d2
add esp, 4
mov ecx, ebx
push eax
push str.RegQueryValueExW__
call fcn.00403980
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 8]
test al, al
jne 0x5dad9c
cmp dword [edi + 0x4c], 2
jne 0x5dad88
mov al, byte [esp + 0x40]
test al, al
je 0x5dad88
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ebp, eax
test ebp, ebp
mov dword [esp + 0x14], ebp
jne 0x5dac70
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi + 0x18], eax
lea eax, [edi + 4]
test eax, eax
je 0x5dac45
lea esi, [eax + 4]
jmp 0x5dac47
xor esi, esi
push str.ExpandEnvironmentStringsW__
call fcn.007ac4d2
add esp, 4
mov ecx, esi
push eax
push str.ExpandEnvironmentStringsW__
call fcn.00403980
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 8]
test al, al
jne 0x5dad9c
mov al, byte [esp + 0x40]
add ebp, 2
mov byte [esp + 0x1c], al
mov dword [esp + 0x10], 0
test ebp, ebp
mov eax, ebp
jge 0x5dac8b
xor eax, eax
lea ecx, [eax + eax]
push ecx
call fcn.007d7320
add esp, 4
mov esi, eax
test ebp, ebp
mov dword [esp + 0x20], esi
mov ebx, esi
jbe 0x5dacc3
mov dword [esp + 0x40], ebp
lea edx, [esp + 0x10]
push edx
push ebx
call fcn.00577050
mov eax, dword [esp + 0x48]
add esp, 8
add ebx, 2
dec eax
mov dword [esp + 0x40], eax
jne 0x5daca7
lea ebp, [esi + ebp*2]
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], ebp
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
inc eax
mov dword [esp + 0x34], 0
push eax
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
jne 0x5dad33
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi + 0x18], eax
lea eax, [edi + 4]
test eax, eax
je 0x5dad01
lea ebx, [eax + 4]
jmp 0x5dad03
xor ebx, ebx
push str.ExpandEnvironmentStringsW__
call fcn.007ac4d2
add esp, 4
mov ecx, ebx
push eax
push str.ExpandEnvironmentStringsW__
call fcn.00403980
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 8]
test al, al
je 0x5dad33
push esi
call fcn.007d7349
add esp, 4
jmp 0x5dad9c
test esi, esi
jne 0x5dad3b
xor ebp, ebp
jmp 0x5dad3f
sub ebp, esi
sar ebp, 1
push esi
mov word [esi + ebp*2 - 2], 0
call fcn.007ac4d2
mov ebp, dword [esp + 0x40]
add esp, 4
mov edi, eax
mov ecx, ebp
push 1
push edi
call fcn.00404d30
test al, al
je 0x5dad7d
mov eax, dword [ebp + 4]
push edi
push esi
push eax
call fcn.004069b0
mov ecx, dword [ebp + 4]
mov dword [ebp + 8], edi
add esp, 0xc
mov word [ecx + edi*2], 0
push esi
call fcn.007d7349
add esp, 4
jmp 0x5dad9c
push esi
call fcn.007ac4d2
mov ecx, dword [esp + 0x40]
add esp, 4
push eax
push esi
call fcn.00403980
mov ecx, dword [esp + 0x2c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x28
ret 8