Function at 0x451136
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov eax, 0x103c
call fcn.004567a0
mov esi, dword [ebp + 0x14]
mov edi, dword [ebp + 8]
cld
mov ecx, 0xffffffff
mov al, 0
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [ebp - 0x1020], ecx
call fcn.00450d70
mov dword [ebp - 0x1024], eax
mov dword [ebp - 0x1028], 0
call fcn.00455710
mov edi, eax
mov dword [ebp - 0x101c], eax
test eax, eax
jne 0x451190
call fcn.00450522
mov dword [ebp - 0x101c], eax
mov dword [esp + 4], 0x2f
mov eax, dword [ebp - 0x101c]
mov dword [esp], eax
call sub.cygwin1.dll_strrchr
mov ebx, eax
test eax, eax
je 0x4511b3
inc ebx
mov dword [ebp - 0x101c], ebx
test edi, edi
je 0x451278
mov dword [esp + 4], 0x2f
mov dword [esp], edi
call sub.cygwin1.dll_strchr
test eax, eax
je 0x451278
mov dword [esp + 8], 0x1000
mov dword [esp + 4], edi
lea eax, [ebp - 0x1018]
mov dword [esp], eax
call sub.cygwin1.dll_strlcpy
lea edi, [ebp - 0x1018]
cld
mov ecx, 0xffffffff
mov al, 0
repne scasb al, byte es:[edi]
not ecx
lea ebx, [ebp + ecx - 0x1019]
lea eax, [ebp - 0x1018]
cmp ebx, eax
jbe 0x45122a
cmp byte [ebx - 1], 0x2f
je 0x45122a
dec ebx
mov byte [ebx], 0
lea eax, [ebp - 0x1018]
cmp ebx, eax
jbe 0x45122a
cmp byte [ebx - 1], 0x2f
jne 0x451216
lea edi, [ebp - 0x1018]
add edi, 0xfff
mov dword [esp + 0x18], edi
mov dword [esp + 0x14], ebx
lea eax, [ebp - 0x1018]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x101c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x10]
and eax, 1
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.004513ba
mov ebx, eax
test eax, eax
jne 0x451385
mov eax, 0
test byte [ebp + 0x10], 0x10
jne 0x4513aa
test esi, esi
jne 0x4512a6
mov dword [esp], 0x451131
call sub.cygwin1.dll_getenv
mov esi, eax
mov eax, 0
test esi, esi
je 0x4513aa
lea edi, [ebp - 0x1018]
add edi, 0xfff
lea ebx, [ebp - 0x1018]
cmp byte [esi], 0x3a
je 0x4512f6
cmp byte [esi], 0
je 0x4512f6
mov eax, ebx
sub eax, dword [ebp - 0x1020]
add eax, 0x1000
cmp ebx, eax
jae 0x4512f6
mov eax, ebx
sub eax, dword [ebp - 0x1020]
lea edx, [eax + 0x1000]
movzx eax, byte [esi]
mov byte [ebx], al
inc esi
inc ebx
cmp byte [esi], 0x3a
je 0x4512f6
cmp byte [esi], 0
je 0x4512f6
cmp ebx, edx
jb 0x4512e1
mov byte [ebx], 0
mov dword [esp + 0x18], edi
mov dword [esp + 0x14], ebx
lea eax, [ebp - 0x1018]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x101c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x10]
and eax, 1
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.004513ba
mov ebx, eax
test eax, eax
jne 0x451385
cmp dword [ebp - 0x1028], 0
jne 0x451369
call fcn.00450d70
mov dword [ebp - 0x1028], eax
cmp eax, 2
je 0x45135f
cmp eax, 0x14
je 0x45135f
cmp eax, 0x15
je 0x45135f
cmp eax, 5
jne 0x451369
mov dword [ebp - 0x1028], 0
cmp byte [esi], 0
je 0x451374
inc esi
jmp 0x4512b2
cmp dword [ebp - 0x1028], 0
je 0x451397
mov eax, dword [ebp - 0x1028]
jmp 0x45139d
mov eax, dword [ebp - 0x1024]
mov dword [esp], eax
call fcn.00450d90
mov eax, ebx
jmp 0x4513aa
mov eax, dword [ebp - 0x1024]
mov dword [esp], eax
call fcn.00450d90
mov eax, 0
add esp, 0x103c
pop ebx
pop esi
pop edi
pop ebp
ret