Function at 0x4156d0
Capabilities:
Query environment variable
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x4293cc
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa4
push ebx
push ebp
push edi
push 0x23
xor ebx, ebx
mov edi, 0xf
push str.Retrieving_environment_variables...
lea ecx, [esp + 0x44]
mov dword [esp + 0x5c], edi
mov dword [esp + 0x58], ebx
mov byte [esp + 0x48], bl
call fcn.00401890
lea eax, [esp + 0x3c]
push eax
mov dword [esp + 0xbc], ebx
call fcn.004122d0
mov eax, dword [esp + 0x58]
add esp, 4
cmp eax, 0x10
mov dword [esp + 0xb8], 0xffffffff
jb 0x415746
mov ecx, dword [esp + 0x40]
push ecx
call fcn.0041aebd
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov edx, dword [esp + 0xc0]
mov ebp, eax
cmp dword [edx + 0x14], ebx
mov dword [esp + 0x74], ebp
jne 0x415778
pop edi
mov eax, ebp
pop ebp
pop ebx
mov ecx, dword [esp + 0xa4]
mov dword fs:[0], ecx
add esp, 0xb0
ret
cmp ebp, ebx
je 0x415b48
push esi
lea ecx, [esp + 0x34]
call fcn.00414aa0
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ebx
push 0x2a
xor esi, esi
push str.Iterating_through_environment_variables...
lea ecx, [esp + 0x20]
mov dword [esp + 0xc4], 1
mov dword [esp + 0x1c], esi
mov dword [esp + 0x38], edi
mov dword [esp + 0x34], ebx
mov byte [esp + 0x24], bl
call fcn.00401890
lea eax, [esp + 0x18]
push eax
mov byte [esp + 0xc0], 2
call fcn.004122d0
mov eax, dword [esp + 0x34]
add esp, 4
cmp eax, 0x10
mov byte [esp + 0xbc], 1
jb 0x4157f2
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.0041aebd
add esp, 4
cmp byte [ebp], bl
je 0x415a4e
mov edi, 0xf
mov eax, ebp
mov dword [esp + 0x74], edi
mov dword [esp + 0x70], ebx
mov byte [esp + 0x60], bl
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x415811
sub eax, esi
push eax
push ebp
lea ecx, [esp + 0x64]
call fcn.00401890
mov edx, dword [esp + 0x70]
push 0x12
push str.INPUT_ENV_VARIABLE
lea ecx, [esp + 0x48]
mov byte [esp + 0xc4], 3
lea ebp, [edx + ebp + 1]
mov dword [esp + 0x60], edi
mov dword [esp + 0x5c], ebx
mov byte [esp + 0x4c], bl
call fcn.00401890
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x44]
push ecx
mov byte [esp + 0xc4], 4
call fcn.00412300
mov eax, dword [esp + 0x60]
mov esi, 0x10
add esp, 8
cmp eax, esi
mov byte [esp + 0xbc], 3
jb 0x41588d
mov edx, dword [esp + 0x44]
push edx
call fcn.0041aebd
add esp, 4
push 5
push ebx
lea eax, [esp + 0x84]
push eax
lea ecx, [esp + 0x68]
mov dword [esp + 0x64], edi
mov dword [esp + 0x60], ebx
mov byte [esp + 0x50], bl
call fcn.00405a70
cmp dword [eax + 0x18], esi
jb 0x4158b7
mov eax, dword [eax + 4]
jmp 0x4158ba
add eax, 4
push 5
push str.PATH
push eax
call fcn.0041c5b4
mov ecx, dword [esp + 0xa0]
add esp, 0xc
neg eax
sbb al, al
inc al
cmp ecx, esi
mov byte [esp + 0x13], al
jb 0x4158f3
mov ecx, dword [esp + 0x80]
push ecx
call fcn.0041aebd
mov al, byte [esp + 0x17]
add esp, 4
cmp al, bl
mov dword [esp + 0x94], edi
mov dword [esp + 0x90], ebx
mov byte [esp + 0x80], bl
je 0x415974
mov edx, dword [esp + 0xc4]
push edx
lea eax, [esp + 0x9c]
push 0x42c41c
push eax
call fcn.00405f60
add esp, 0xc
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0x68]
mov byte [esp + 0xc8], 5
call fcn.00401420
cmp dword [esp + 0xb0], esi
mov byte [esp + 0xbc], 3
jb 0x41595f
mov ecx, dword [esp + 0x9c]
push ecx
call fcn.0041aebd
add esp, 4
mov dword [esp + 0xb0], edi
mov dword [esp + 0xac], ebx
mov byte [esp + 0x9c], bl
push 0x16
push str.PROCESSED_ENV_VARIABLE
lea ecx, [esp + 0x20]
mov dword [esp + 0x38], edi
mov dword [esp + 0x34], ebx
mov byte [esp + 0x24], bl
call fcn.00401890
lea edx, [esp + 0x5c]
push edx
lea eax, [esp + 0x1c]
push eax
mov byte [esp + 0xc4], 6
call fcn.00412300
mov eax, dword [esp + 0x38]
add esp, 8
cmp eax, esi
mov byte [esp + 0xbc], 3
jb 0x4159c7
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.0041aebd
add esp, 4
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x30], edi
mov edi, dword [esp + 0x38]
mov eax, dword [edi + 4]
lea edx, [esp + 0x5c]
add edi, 4
push edx
push eax
push ecx
lea ecx, [esp + 0x40]
mov dword [esp + 0x38], ebx
mov byte [esp + 0x28], bl
call fcn.00414af0
push 1
lea ecx, [esp + 0x38]
mov esi, eax
call fcn.00414b90
mov dword [edi], esi
mov eax, dword [esi + 4]
mov dword [eax], esi
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x70]
lea ecx, [eax + edx + 1]
cmp dword [esp + 0x74], 0x10
mov dword [esp + 0x14], ecx
mov byte [esp + 0xbc], 1
jb 0x415a31
mov edx, dword [esp + 0x60]
push edx
call fcn.0041aebd
add esp, 4
mov dword [esp + 0x74], 0xf
mov dword [esp + 0x70], ebx
mov byte [esp + 0x60], bl
cmp byte [ebp], bl
jne 0x4157fb
mov esi, dword [esp + 0x14]
inc esi
push esi
call fcn.0041aa7b
mov esi, eax
mov eax, dword [esp + 0x3c]
mov ebp, dword [eax]
add esp, 4
cmp ebp, eax
mov dword [esp + 0x14], esi
mov edi, esi
je 0x415b0a
mov edi, edi
cmp dword [ebp + 0x20], 0x10
jb 0x415a7b
mov esi, dword [ebp + 0xc]
jmp 0x415a7e
lea esi, [ebp + 0xc]
push 0x10
push str.OUT_ENV_VARIABLE
lea ecx, [esp + 0x20]
mov dword [esp + 0x38], 0xf
mov dword [esp + 0x34], ebx
mov byte [esp + 0x24], bl
call fcn.00401890
lea eax, [esp + 0x18]
push esi
push eax
mov byte [esp + 0xc4], 7
call fcn.00412360
mov eax, dword [esp + 0x38]
add esp, 8
cmp eax, 0x10
mov byte [esp + 0xbc], 1
jb 0x415ad2
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.0041aebd
add esp, 4
mov edx, edi
mov dword [esp + 0x30], 0xf
mov dword [esp + 0x2c], ebx
mov byte [esp + 0x1c], bl
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
cmp cl, bl
jne 0x415ae8
mov edx, dword [ebp + 0x1c]
mov ebp, dword [ebp]
cmp ebp, dword [esp + 0x38]
lea edi, [edi + edx + 1]
jne 0x415a70
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x78]
push eax
mov byte [edi], bl
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
lea ecx, [esp + 0x34]
call fcn.00414d50
mov ecx, dword [esp + 0x38]
push ecx
call fcn.0041aebd
add esp, 4
mov eax, esi
pop esi
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0xa4]
mov dword fs:[0], ecx
add esp, 0xb0
ret
mov ecx, dword [esp + 0xb0]
pop edi
pop ebp
xor eax, eax
pop ebx
mov dword fs:[0], ecx
add esp, 0xb0
ret