Function at 0x507650
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x659743
mov eax, dword fs:[0]
push eax
sub esp, 0x1f8
mov eax, dword [0x6dc0b8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
xor ebx, ebx
mov eax, dword [ebp + 0x10]
mov ecx, esi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x1e4], esi
mov dword [ebp - 0x1d8], edi
mov dword [ebp - 0x1e0], eax
mov dword [ebp - 0x1dc], ebx
call fcn.0061538b
test eax, eax
je 0x507b73
push ebx
mov ecx, esi
call fcn.00614b15
push eax
lea ecx, [ebp - 0x204]
call fcn.006147d4
lea eax, [ebp - 0x174]
mov dword [ebp - 4], 0
push eax
push str.name
lea ecx, [ebp - 0x204]
call fcn.00614bdd
mov ecx, eax
call fcn.00614dfd
push 0x104
lea eax, [ebp - 0x114]
mov byte [ebp - 4], 1
push 0
push eax
call fcn.005e0dd0
add esp, 0xc
lea ecx, [ebp - 0x114]
cmp dword [ebp - 0x160], 0x10
lea eax, [ebp - 0x174]
cmovae eax, dword [ebp - 0x174]
push 0x104
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp byte [ebp - 0x114], 0
mov dword [ebp - 0x14c], 0
mov dword [ebp - 0x148], 0
mov dword [ebp - 0x148], 0xf
mov dword [ebp - 0x14c], 0
mov byte [ebp - 0x15c], 0
jne 0x507766
xor eax, eax
jmp 0x507779
lea eax, [ebp - 0x114]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x507770
sub eax, edx
push eax
lea eax, [ebp - 0x114]
push eax
lea ecx, [ebp - 0x15c]
call fcn.00414ab0
push str.command
lea ecx, [ebp - 0x204]
mov byte [ebp - 4], 2
call fcn.00614bdd
push eax
lea ecx, [ebp - 0x1f4]
call fcn.006147d4
lea ecx, [ebp - 0x1f4]
mov byte [ebp - 4], 3
xor esi, esi
call fcn.0061538b
test eax, eax
je 0x507abc
mov ebx, dword [ebp - 0x1e0]
nop dword [eax + eax]
lea eax, [ebp - 0x12c]
push eax
push esi
lea ecx, [ebp - 0x1f4]
call fcn.00614b15
mov ecx, eax
call fcn.00614dfd
lea eax, [ebp - 0x12c]
mov byte [ebp - 4], 4
push eax
lea eax, [ebp - 0x18c]
push edi
push eax
call fcn.005092a0
add esp, 0xc
mov edi, eax
lea eax, [ebp - 0x12c]
mov byte [ebp - 4], 5
cmp eax, edi
je 0x50785a
mov eax, dword [ebp - 0x118]
cmp eax, 0x10
jb 0x507833
inc eax
lea ecx, [ebp - 0x12c]
push eax
push dword [ebp - 0x12c]
call fcn.00414c80
push edi
lea ecx, [ebp - 0x12c]
mov dword [ebp - 0x118], 0xf
mov dword [ebp - 0x11c], 0
mov byte [ebp - 0x12c], 0
call fcn.00414640
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x178]
cmp eax, 0x10
jb 0x50787c
inc eax
lea ecx, [ebp - 0x18c]
push eax
push dword [ebp - 0x18c]
call fcn.00414c80
lea edx, [ebp - 0x12c]
mov dword [ebp - 0x178], 0xf
lea ecx, [ebp - 0x1a4]
mov dword [ebp - 0x17c], 0
mov byte [ebp - 0x18c], 0
call fcn.00507350
push 7
push str._param
push 0
mov ecx, eax
mov byte [ebp - 4], 6
call fcn.004fa170
mov dword [ebp - 0x134], 0
lea ecx, [ebp - 0x144]
mov dword [ebp - 0x130], 0
push eax
mov dword [ebp - 0x130], 0xf
mov dword [ebp - 0x134], 0
mov byte [ebp - 0x144], 0
call fcn.00414640
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0x118]
cmp eax, 0x10
jb 0x507919
inc eax
lea ecx, [ebp - 0x12c]
push eax
push dword [ebp - 0x12c]
call fcn.00414c80
lea eax, [ebp - 0x144]
mov dword [ebp - 0x118], 0xf
push eax
lea ecx, [ebp - 0x12c]
mov dword [ebp - 0x11c], 0
mov byte [ebp - 0x12c], 0
call fcn.00414640
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x130]
cmp eax, 0x10
jb 0x507968
inc eax
lea ecx, [ebp - 0x144]
push eax
push dword [ebp - 0x144]
call fcn.00414c80
mov dword [ebp - 0x130], 0xf
mov dword [ebp - 0x134], 0
mov byte [ebp - 0x144], 0
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x190]
cmp eax, 0x10
jb 0x5079a5
inc eax
lea ecx, [ebp - 0x1a4]
push eax
push dword [ebp - 0x1a4]
call fcn.00414c80
lea eax, [ebp - 0x12c]
mov dword [ebp - 0x190], 0xf
push eax
lea eax, [ebp - 0x15c]
mov dword [ebp - 0x194], 0
push eax
lea eax, [ebp - 0x1d4]
mov byte [ebp - 0x1a4], 0
push eax
call fcn.00509360
add esp, 0xc
push eax
mov ecx, ebx
mov byte [ebp - 4], 8
call fcn.00508df0
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x1a8]
cmp eax, 0x10
jb 0x507a0b
inc eax
lea ecx, [ebp - 0x1bc]
push eax
push dword [ebp - 0x1bc]
call fcn.00414c80
mov eax, dword [ebp - 0x1c0]
mov dword [ebp - 0x1a8], 0xf
mov dword [ebp - 0x1ac], 0
mov byte [ebp - 0x1bc], 0
cmp eax, 0x10
jb 0x507a44
inc eax
lea ecx, [ebp - 0x1d4]
push eax
push dword [ebp - 0x1d4]
call fcn.00414c80
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x118]
mov dword [ebp - 0x1c0], 0xf
mov dword [ebp - 0x1c4], 0
mov byte [ebp - 0x1d4], 0
cmp eax, 0x10
jb 0x507a81
inc eax
lea ecx, [ebp - 0x12c]
push eax
push dword [ebp - 0x12c]
call fcn.00414c80
lea ecx, [ebp - 0x1f4]
mov dword [ebp - 0x118], 0xf
mov dword [ebp - 0x11c], 0
inc esi
mov byte [ebp - 0x12c], 0
call fcn.0061538b
mov edi, dword [ebp - 0x1d8]
cmp esi, eax
jb 0x5077d0
mov ebx, dword [ebp - 0x1dc]
lea ecx, [ebp - 0x1f4]
mov byte [ebp - 4], 2
call fcn.00614a31
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x148]
cmp eax, 0x10
jb 0x507aed
inc eax
lea ecx, [ebp - 0x15c]
push eax
push dword [ebp - 0x15c]
call fcn.00414c80
mov dword [ebp - 0x148], 0xf
mov dword [ebp - 0x14c], 0
mov byte [ebp - 0x15c], 0
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x160]
cmp eax, 0x10
jb 0x507b2a
inc eax
lea ecx, [ebp - 0x174]
push eax
push dword [ebp - 0x174]
call fcn.00414c80
mov dword [ebp - 0x160], 0xf
lea ecx, [ebp - 0x204]
mov dword [ebp - 0x164], 0
mov byte [ebp - 0x174], 0
mov dword [ebp - 4], 0xffffffff
call fcn.00614a31
mov esi, dword [ebp - 0x1e4]
inc ebx
mov ecx, esi
mov dword [ebp - 0x1dc], ebx
call fcn.0061538b
cmp ebx, eax
jb 0x5076b0
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00545b50
mov esp, ebp
pop ebp
ret 0xc