Function at 0x61014e40
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
lea ecx, [ebp - 0xf8]
push edi
push esi
push ebx
sub esp, 0x14c
mov dword [ebp - 0x100], edx
mov edx, dword fs:[4]
mov dword [ebp - 0xfc], eax
xor eax, eax
sub edx, 0x319c
mov dword [ebp - 0x110], eax
mov eax, dword [edx + 0xc30]
mov dword [ebp - 0x28], eax
mov eax, dword [edx + 0xc34]
mov dword [edx + 0xc30], ecx
mov dword [ebp - 0x24], eax
xor eax, eax
mov dword [edx + 0xc34], eax
mov dword [esp], ecx
call sym.___sjfault
test eax, eax
jne 0x61015589
cmp byte [0x61141488], 0
je 0x61015008
mov eax, 0x6111a891
call sym.__Z6regoptPKc_4
mov byte [ebp - 0x111], al
mov eax, dword [0x61109170]
cmp byte [eax + 0x18], 0
jne 0x6101506c
mov eax, dword [0x611650ec]
test byte [eax + 0x10], 0x20
jne 0x610150a0
mov ebx, dword [ebp - 0xfc]
test ebx, ebx
je 0x61015100
mov eax, dword [ebp - 0x100]
lea eax, [eax*4 + 4]
mov dword [ebp - 0x118], eax
mov dword [ebp - 0x100], eax
mov dword [esp], eax
call sym._malloc_1
mov edx, dword [ebp - 0x100]
mov ebx, eax
mov edi, eax
mov esi, dword [ebp - 0xfc]
cmp edx, 7
jbe 0x61014f30
test al, 4
jne 0x610150d2
lea esi, [esi]
cld
mov ecx, edx
shr ecx, 2
test dl, 2
rep movsd dword es:[edi], dword [esi]
je 0x61014f49
movzx eax, word [esi]
add esi, 2
mov word [edi], ax
add edi, 2
test dl, 1
je 0x61014f53
movzx eax, byte [esi]
mov byte [edi], al
mov eax, dword [ebp - 0xfc]
call sym._cfree_4
imul eax, dword [0x61102220], 0x3e8
mov dword [ebp - 0xfc], ebx
mov ecx, dword [0x61102224]
add eax, ecx
cmp eax, 0x1c
ja 0x61014f9c
mov esi, ebx
jmp 0x61014f96
mov dword [esp], eax
mov ebx, eax
call sym._strdup_1
mov dword [esi], eax
mov eax, ebx
add esi, 4
call sym._cfree_4
mov eax, dword [esi]
test eax, eax
jne 0x61014f80
mov ecx, dword [ebp - 0xfc]
mov edx, sym.__Z10my_findenvPKcPi_8
mov dword [sym.__Z8getearlyPKcPi_8], edx
mov dword [sym.cygwin1.dll___cygwin_environ], ecx
call sym.__Z14update_envptrsv_0
mov dword [esp], 0x6111a7f1
call sym.cygwin1.dll__getenv
mov dword [ebp - 0x10c], eax
test eax, eax
je 0x61014fd3
call sym.__Z13parse_optionsPc_4
cmp byte [ebp - 0x111], 0
je 0x61014fe3
xor eax, eax
call sym.__Z13parse_optionsPc_4
mov eax, dword fs:[4]
mov edx, dword [ebp - 0x28]
sub eax, 0x319c
mov dword [eax + 0xc30], edx
mov edx, dword [ebp - 0x24]
mov dword [eax + 0xc34], edx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, dword [0x61102270]
test edi, edi
je 0x61014eb0
mov ecx, 0x61102270
nop
lea esi, [esi]
mov edx, dword [ecx]
add ecx, 0x24
movzx eax, byte [edx]
movsx eax, byte [eax + 0x61108d40]
mov byte [eax + 0x61141488], 1
movzx eax, byte [edx]
movsx eax, byte [eax + 0x61108c40]
mov byte [eax + 0x61141488], 1
mov esi, dword [ecx]
test esi, esi
jne 0x61015020
mov eax, 0x6111a891
call sym.__Z6regoptPKc_4
mov byte [ebp - 0x111], al
mov eax, dword [0x61109170]
cmp byte [eax + 0x18], 0
je 0x61014ecf
add eax, 0x18
xor ebx, ebx
call sym.__Z6regoptPKc_4
test al, al
je 0x610150f2
mov bl, 1
mov byte [ebp - 0x111], bl
mov eax, dword [0x611650ec]
test byte [eax + 0x10], 0x20
je 0x61014ede
jmp 0x610150a0
mov byte [0x61148132], 1
mov eax, dword [ebp - 0xfc]
test eax, eax
je 0x61015100
mov edi, dword [ebp - 0x100]
lea edi, [edi*4 + 4]
mov dword [ebp - 0x118], edi
mov dword [ebp - 0x100], edi
mov dword [esp], edi
jmp 0x61014f08
mov edx, dword [ebp - 0xfc]
lea edi, [ebx + 4]
mov eax, dword [edx]
mov esi, edx
add esi, 4
mov dword [ebx], eax
mov edx, dword [ebp - 0x118]
sub edx, 4
jmp 0x61014f30
cmp byte [ebp - 0x111], 0
je 0x6101507c
jmp 0x6101507a
mov dword [esp], 0x1a0
mov eax, 0x64
mov dword [ebp - 0x100], eax
call sym._malloc_1
mov dword [ebp - 0xfc], eax
mov dword [0x61141478], eax
call sub.KERNEL32.dll_GetEnvironmentStrings
mov dword [ebp - 0x104], eax
test eax, eax
je 0x6101555d
test byte [0x6110c854], 1
jne 0x610154f3
xor eax, eax
mov dword [ebp - 0x108], eax
mov eax, dword [ebp - 0x104]
mov dword [ebp - 0x10c], eax
cmp byte [eax], 0
jne 0x6101526f
mov dword [esp], str.TERMcygwin
call sym._strdup_1
mov edx, dword [ebp - 0x108]
mov ecx, dword [ebp - 0xfc]
mov dword [ecx + edx*4], eax
inc edx
mov dword [ebp - 0x108], edx
mov edi, dword [ebp - 0x108]
mov eax, dword [ebp - 0xfc]
mov edx, dword [ebp - 0x104]
mov dword [eax + edi*4], 0
mov dword [esp], edx
call sub.KERNEL32.dll_FreeEnvironmentStringsA
mov ecx, dword [ebp - 0xfc]
mov eax, sym.__Z10my_findenvPKcPi_8
sub esp, 4
mov dword [sym.__Z8getearlyPKcPi_8], eax
mov dword [sym.cygwin1.dll___cygwin_environ], ecx
call sym.__Z14update_envptrsv_0
xor eax, eax
test al, al
je 0x61014fd3
jmp 0x61014fb8
cmp ebx, dword [ebp - 0x12c]
mov edx, ebx
jmp 0x61015202
movzx ecx, byte [edx]
movsx eax, cl
test byte [eax + str.______________], 2
je 0x610151fb
movzx eax, cl
movzx eax, byte [eax + 0x61108c40]
mov byte [edx], al
inc edx
cmp edx, dword [ebp - 0x12c]
jb 0x610151e0
movzx eax, byte [ebx]
cmp al, 0x54
je 0x610152e1
cmp al, 0x43
je 0x610154bc
mov ecx, dword [ebp - 0x12c]
cmp byte [ecx], 0
jne 0x6101530f
lea esi, [esi]
lea edi, [edi]
test byte [0x6110c854], 1
jne 0x61015430
xor eax, eax
mov edx, dword [ebp - 0x10c]
mov ah, al
mov al, byte [edx]
cmp al, ah
je 0x61015254
inc edx
test al, al
jne 0x61015247
xor edx, edx
mov eax, edx
inc dword [ebp - 0x108]
lea edi, [eax + 1]
mov dword [ebp - 0x10c], edi
cmp byte [eax + 1], 0
je 0x610154e0
mov eax, dword [ebp - 0x10c]
mov dword [esp], eax
call sym._strdup_1
mov edx, dword [ebp - 0x100]
mov ebx, eax
cmp dword [ebp - 0x108], edx
jge 0x61015476
mov ecx, dword [ebp - 0x108]
mov edi, dword [ebp - 0xfc]
mov dword [edi + ecx*4], eax
cmp byte [ebx], 0x3d
je 0x610154b4
mov ecx, 0x3d
mov edx, ebx
mov eax, ecx
mov ah, al
mov al, byte [edx]
cmp al, ah
je 0x610152c0
inc edx
test al, al
jne 0x610152b4
dec edx
mov eax, edx
mov dword [ebp - 0x12c], eax
mov edx, dword [0x61107524]
test edx, edx
je 0x610151d0
movzx eax, byte [ebx]
cmp al, 0x54
jne 0x6101520f
cld
mov eax, str.TERM
mov ecx, 5
mov esi, ebx
mov edi, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x61015300
mov eax, 1
mov dword [ebp - 0x110], eax
nop
mov eax, dword [ebp - 0x12c]
cmp byte [eax], 0
je 0x61015230
mov edx, dword [ebp - 0x108]
mov ecx, dword [ebp - 0xfc]
mov eax, dword [ecx + edx*4]
movzx eax, byte [eax]
cmp byte [eax + 0x61141488], 0
je 0x61015230
mov eax, dword [ebp - 0x12c]
lea edi, [ecx + edx*4]
mov edx, dword [ebp - 0x12c]
mov dword [ebp - 0x120], edi
inc eax
mov dword [ebp - 0x11c], eax
cmp byte [edx + 1], 0
jne 0x61015356
mov dword [ebp - 0x11c], edx
mov ecx, dword [ebp - 0x120]
xor edx, edx
mov ecx, dword [ecx]
mov dword [ebp - 0x124], ecx
mov eax, dword [ebp - 0x124]
xor ecx, ecx
call sym.__Z9getwinenvPKcS0_P7win_env_12
test eax, eax
mov esi, eax
je 0x61015230
mov edi, dword [ebp - 0x124]
mov eax, 0x6111a89f
mov dword [esp + 4], eax
mov dword [esp], edi
call sym.cygwin1.dll__strcspn
mov ebx, eax
mov eax, dword [ebp - 0x11c]
inc ebx
mov dword [esp], eax
call dword [esi + 0x18]
lea eax, [eax + ebx + 1]
mov dword [esp], eax
call sym._malloc_1
mov dword [esp], eax
mov edx, dword [ebp - 0x124]
mov edi, eax
mov dword [esp + 8], ebx
lea ebx, [edi + ebx]
mov dword [esp + 4], edx
call sym.cygwin1.dll__memcpy
mov dword [esp + 4], ebx
mov ecx, dword [ebp - 0x11c]
mov dword [esp], ecx
call dword [esi + 0x10]
mov eax, dword [ebp - 0x11c]
xor ecx, ecx
cmp byte [eax], 0x2f
je 0x610153e9
mov ecx, eax
mov edx, ebx
mov eax, esi
call method.win_env.add_cache_char_const__char_const_
test byte [0x6110c854], 1
jne 0x6101552d
mov edx, dword [ebp - 0x120]
mov ecx, dword [ebp - 0x124]
mov dword [edx], edi
mov dword [esp], ecx
call sym._free_1
test byte [0x6110c854], 1
je 0x6101523d
lea esi, [esi]
lea edi, [edi]
mov edx, dword [ebp - 0x108]
mov edi, str._p:__s
mov esi, str.void_environ_init_char__int_
mov ecx, dword [ebp - 0xfc]
mov ebx, 0x40
mov eax, dword [ecx + edx*4]
mov dword [esp + 0x14], eax
mov eax, dword [ecx + edx*4]
mov dword [esp + 0xc], edi
mov dword [esp + 8], esi
mov dword [esp + 0x10], eax
mov dword [esp + 4], ebx
mov dword [esp], 0x6110c854
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x6101523d
add dword [ebp - 0x100], 0x64
mov ecx, dword [ebp - 0xfc]
mov edx, dword [ebp - 0x100]
mov dword [esp], ecx
lea eax, [edx*4 + 0x10]
mov dword [esp + 4], eax
call sym._realloc_1
mov dword [ebp - 0xfc], eax
mov edi, dword [ebp - 0x108]
mov dword [eax + edi*4], ebx
cmp byte [ebx], 0x3d
jne 0x610152a9
mov byte [ebx], 0x21
jmp 0x610152a9
cld
mov eax, 0x6111a8a8
mov ecx, 7
mov esi, ebx
mov edi, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x61015300
lea eax, [ebx + 7]
call sym.__Z13parse_optionsPc_4
jmp 0x61015300
mov eax, dword [ebp - 0x110]
test eax, eax
jne 0x61015181
jmp 0x6101515f
mov dword [esp], 0x6110c854
mov edi, dword [ebp - 0x104]
mov esi, str.GetEnvironmentStrings_returned__p_____s_
mov dword [esp + 0xc], esi
mov ebx, str.void_environ_init_char__int_
mov ecx, 0x40
mov dword [esp + 8], ebx
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], edi
mov dword [esp + 4], ecx
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x61015142
mov dword [esp + 0x10], edi
mov eax, str.env_var_converted_to__s
mov dword [esp + 0xc], eax
mov eax, str.void_posify_char__const_char_
mov dword [esp + 8], eax
mov eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], 0x6110c854
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x610153ff
mov dword [esp], 0x6110c854
mov eax, str.GetEnvironmentStrings_returned_NULL___E
mov edi, 0x8000
mov dword [esp + 0xc], eax
mov eax, str.void_environ_init_char__int_
mov dword [esp + 8], eax
mov dword [esp + 4], edi
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x61014fe3
mov dword [esp], str.internal_error_reading_the_windows_environment___too_many_environment_variables_
call sym.___api_fatal
nop
lea esi, [esi]
lea edi, [edi]