Function at 0x61020b80
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov dword [ebp - 0x10], eax
mov eax, dword [0x61110968]
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x20], 0
test eax, eax
jne 0x61020be7
mov eax, dword [0x610edc6c]
test eax, eax
je 0x61020bdd
mov ecx, 0x610edc6c
lea esi, [esi]
mov edx, dword [ecx]
add ecx, 0x20
movzx eax, byte [edx]
movsx eax, byte [eax + 0x610eefe4]
mov byte [eax + 0x61110868], 1
movzx eax, byte [edx]
movsx eax, byte [eax + 0x610ef0e4]
mov byte [eax + 0x61110868], 1
mov eax, dword [ecx]
test eax, eax
jne 0x61020bb0
mov eax, 1
mov dword [0x61110968], eax
mov dword [esp], 0x61020b5f
call fcn.610209d0
mov byte [ebp - 0x22], al
sub esp, 4
mov eax, dword [0x610ef740]
cmp byte [eax + 0x1c], 0
jne 0x61020f84
mov eax, dword [0x61148914]
movzx eax, byte [eax + 0xc]
shr al, 5
and eax, 1
test al, al
je 0x61020c22
mov byte [0x61146ea0], 1
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x61020d26
mov eax, dword [ebp - 0x14]
lea eax, [eax*4 + 4]
mov dword [ebp - 0x14], eax
mov dword [esp], eax
call fcn.61054c10
mov ebx, eax
mov edi, eax
mov esi, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
cmp eax, 7
jbe 0x61020c70
test bl, 4
je 0x61020c70
mov eax, dword [esi]
lea edi, [ebx + 4]
mov dword [ebx], eax
mov esi, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
add esi, 4
sub eax, 4
lea esi, [esi]
cld
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x10]
call fcn.61002b30
mov dword [ebp - 0x10], ebx
mov eax, dword [0x610e90a0]
mov edi, dword [0x610e90a4]
imul eax, eax, 0x3e8
add eax, edi
cmp eax, 0x1c
ja 0x61020cd0
mov eax, dword [ebx]
mov esi, ebx
test eax, eax
je 0x61020cd0
mov ebx, eax
lea esi, [esi]
lea edi, [edi]
mov dword [esp], ebx
call fcn.61055160
mov dword [esi], eax
mov eax, ebx
add esi, 4
call fcn.61002b30
mov eax, dword [esi]
test eax, eax
mov ebx, eax
jne 0x61020cb0
lea esi, [esi]
mov byte [ebp - 0x21], 1
mov eax, dword [ebp - 0x10]
mov dword [sym.cygwin1.dll___cygwin_environ], eax
call fcn.6101cdf0
cmp byte [ebp - 0x21], 0
jne 0x61020d06
cmp byte [ebp - 0x22], 0
jne 0x61020cf5
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0
call fcn.610204a0
sub esp, 4
jmp 0x61020ced
mov dword [esp], 0x6102048c
call sym.cygwin1.dll__getenv
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x61020ce7
mov dword [esp], eax
call fcn.610204a0
sub esp, 4
jmp 0x61020ce7
mov byte [ebp - 0x21], 0
mov dword [ebp - 0x14], 0x64
mov dword [esp], 0x1a0
call fcn.61054c10
mov dword [ebp - 0x10], eax
mov dword [0x61110858], eax
call sub.KERNEL32.dll_GetEnvironmentStrings
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], 0
lea esi, [esi]
lea edi, [edi]
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x2c]
cmp byte [ecx], 0
je 0x61020f4c
mov edx, dword [ebp - 0x2c]
mov dword [esp], edx
call fcn.61055160
mov ecx, dword [ebp - 0x14]
mov ebx, eax
cmp dword [ebp - 0x1c], ecx
jge 0x61020f28
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x10]
mov dword [edx + eax*4], ebx
cmp byte [ebx], 0x3d
je 0x61020f20
mov ecx, 0x3d
mov edx, ebx
mov eax, ecx
mov ah, al
mov al, byte [edx]
cmp al, ah
je 0x61020db1
inc edx
test al, al
jne 0x61020da5
dec edx
mov eax, edx
mov dword [ebp - 0x28], eax
mov esi, dword [0x610edacc]
test esi, esi
jne 0x61020dd0
cmp ebx, eax
mov esi, ebx
jb 0x61020ef5
lea esi, [esi]
movzx ecx, byte [ebx]
cmp cl, 0x54
mov byte [ebp - 0x2d], cl
je 0x61020ed0
cmp byte [ebp - 0x2d], 0x43
je 0x61020ea0
mov eax, dword [ebp - 0x28]
cmp byte [eax], 0
je 0x61020e30
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx + edx*4]
movzx eax, byte [eax]
cmp byte [eax + 0x61110868], 0
je 0x61020e30
mov eax, dword [ebp - 0x28]
mov edi, dword [ebp - 0x28]
inc eax
cmp byte [edi + 1], 0
jne 0x61020e15
mov eax, edi
mov dword [esp + 4], eax
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x10]
lea eax, [ecx + edx*4]
mov dword [esp], eax
call fcn.6101f8a0
sub esp, 8
lea esi, [esi]
mov ecx, dword [0x610f08a0]
test ecx, ecx
jne 0x61020e60
xor eax, eax
mov edx, dword [ebp - 0x2c]
mov ah, al
mov al, byte [edx]
cmp al, ah
je 0x61020e4e
inc edx
test al, al
jne 0x61020e41
xor edx, edx
mov eax, edx
inc dword [ebp - 0x1c]
inc eax
jmp 0x61020d60
mov edi, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + edi*4]
mov dword [esp + 0x14], eax
mov eax, dword [edx + edi*4]
mov dword [esp + 0xc], 0x61020b67
mov dword [esp + 8], 0x61020b40
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x40
mov dword [esp], 0x610f089c
call fcn.6108fd50
jmp 0x61020e3a
cld
mov eax, 0x61020b6e
mov ecx, 7
mov esi, ebx
mov edi, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x61020de9
lea eax, [ebx + 7]
mov dword [esp], eax
call fcn.610204a0
sub esp, 4
jmp 0x61020de9
cld
mov edx, 0x61020b76
mov eax, 5
mov esi, ebx
mov edi, edx
mov ecx, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x61020ddf
mov dword [ebp - 0x20], 1
jmp 0x61020ddf
movsx eax, byte [esi]
mov dword [esp], eax
call sym.cygwin1.dll__islower
test eax, eax
je 0x61020f10
movzx eax, byte [esi]
movzx eax, byte [eax + 0x610ef0e4]
mov byte [esi], al
inc esi
cmp esi, dword [ebp - 0x28]
jb 0x61020ef5
jmp 0x61020dd0
mov byte [ebx], 0x21
jmp 0x61020d9a
mov edi, dword [ebp - 0x10]
add ecx, 0x64
lea eax, [ecx*4 + 0x10]
mov dword [ebp - 0x14], ecx
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.61054d00
mov dword [ebp - 0x10], eax
jmp 0x61020d88
mov edx, dword [ebp - 0x20]
test edx, edx
jne 0x61020f64
mov edi, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x10]
mov dword [eax + edi*4], str.TERMcygwin
inc edi
mov dword [ebp - 0x1c], edi
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x10]
mov edi, dword [ebp - 0x18]
mov dword [ecx + edx*4], 0
mov dword [esp], edi
call sub.KERNEL32.dll_FreeEnvironmentStringsA
sub esp, 4
jmp 0x61020cd4
add eax, 0x1c
xor ebx, ebx
mov dword [esp], eax
call fcn.610209d0
sub esp, 4
test al, al
jne 0x61020f9e
cmp byte [ebp - 0x22], 0
je 0x61020fa0
mov bl, 1
mov byte [ebp - 0x22], bl
jmp 0x61020c08