Function at 0x415c10
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, eax
push edi
push esi
push ebx
sub esp, 0x2c
mov dword [esp + 0x1c], ecx
mov esi, dword [esp + 0x48]
test ecx, ecx
je 0x41566e
mov eax, dword [0x4cc07c]
mov edi, edx
test eax, eax
je 0x4155c0
cmp dword [0x4cc068], 0xffffffff
je 0x4155d4
mov ebx, dword [0x51a108]
test ebx, ebx
jne 0x4155d4
mov eax, dword [esp + 0x1c]
movzx edx, byte [eax]
cmp dl, 0x2d
je 0x415970
mov eax, dword [0x4cc068]
test eax, eax
jne 0x415878
cmp dl, 0x2b
je 0x415625
mov ecx, dword [0x4cc074]
mov dword [0x51a104], 0
movsx eax, byte [ecx]
test al, al
je 0x4156b0
lea esi, cs:[esi]
lea esi, [esi]
mov edx, dword [esp + 0x40]
test edx, edx
je 0x4158f6
mov edx, dword [0x4cc07c]
cmp ecx, dword [edi + edx*4]
je 0x4158f6
cmp al, 0x2d
je 0x415a0d
and esi, 4
jne 0x4158a8
lea esi, [ecx + 1]
movsx ebx, al
mov dword [0x4cc074], esi
cmp al, 0x3a
jne 0x415913
mov ebx, 0x3a
cmp byte [ecx + 1], 0
jne 0x415592
add dword [0x4cc07c], 1
mov eax, dword [0x4cc080]
test eax, eax
je 0x4155a8
mov eax, dword [esp + 0x1c]
cmp byte [eax], 0x3a
jne 0x4159f2
mov dword [0x4cc078], ebx
add esp, 0x2c
mov ebx, 0x3f
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [0x51a108], 1
mov dword [0x4cc07c], 1
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], str.POSIXLY_CORRECT
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
sub esp, 0xc
test eax, eax
mov ecx, dword [esp + 0x1c]
setne al
movzx eax, al
movzx edx, byte [ecx]
mov dword [0x4cc068], eax
mov eax, dword [0x51a108]
cmp dl, 0x2d
je 0x415680
mov ecx, dword [0x4cc068]
test ecx, ecx
jne 0x415860
cmp dl, 0x2b
jne 0x415688
and esi, 0xfffffffe
jmp 0x415683
mov esi, dword [0x4cc06c]
mov ebp, dword [0x4cc070]
mov dword [0x4cc074], 0x4d3b28
cmp esi, 0xffffffff
jne 0x41588b
cmp ebp, 0xffffffff
je 0x41565a
mov dword [0x4cc07c], ebp
mov dword [0x4cc06c], 0xffffffff
mov dword [0x4cc070], 0xffffffff
mov ebx, 0xffffffff
add esp, 0x2c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
or esi, 2
add dword [esp + 0x1c], 1
mov dword [0x51a104], 0
test eax, eax
je 0x415747
mov dword [0x4cc06c], 0xffffffff
mov dword [0x4cc070], 0xffffffff
nop
mov ebx, dword [0x4cc07c]
mov dword [0x51a108], 0
cmp ebx, ebp
jge 0x415630
mov edx, dword [edi + ebx*4]
cmp byte [edx], 0x2d
je 0x415760
mov dword [0x4cc074], 0x4d3b28
test esi, 2
jne 0x415838
test esi, 1
je 0x41566e
mov eax, dword [0x4cc070]
cmp eax, 0xffffffff
je 0x415828
mov edx, dword [0x4cc06c]
cmp edx, 0xffffffff
je 0x41573e
mov dword [esp], edi
mov ecx, ebx
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], eax
call fcn.00414fc0
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov dword [0x4cc06c], 0xffffffff
sub edx, eax
mov eax, ebx
sub eax, edx
mov dword [0x4cc070], eax
add ebx, 1
mov dword [0x4cc07c], ebx
mov ecx, dword [0x4cc074]
movsx eax, byte [ecx]
test al, al
je 0x4156b0
jmp 0x415540
movsx eax, byte [edx + 1]
test al, al
jne 0x415987
mov eax, dword [esp + 0x1c]
mov dword [esp + 4], 0x2d
mov dword [esp + 0x14], edx
mov dword [esp], eax
call sub.msvcrt.dll_strchr
mov edx, dword [esp + 0x14]
test eax, eax
je 0x4156d4
cmp dword [0x4cc070], 0xffffffff
je 0x4157a6
cmp dword [0x4cc06c], 0xffffffff
je 0x415a94
lea esi, [edx + 1]
mov dword [0x4cc074], esi
cmp byte [edx + 1], 0
mov dword [esp + 0x14], edx
jne 0x4159e8
mov eax, dword [esp + 0x1c]
mov dword [esp + 4], 0x2d
mov dword [esp], eax
call sub.msvcrt.dll_strchr
mov edx, dword [esp + 0x14]
test eax, eax
je 0x41566e
cmp byte [eax + 1], 0x3a
mov ebx, 0x2d
mov ecx, edx
jne 0x41595f
mov dword [0x51a104], 0
cmp byte [ecx + 1], 0
mov edx, dword [0x4cc07c]
je 0x415b50
mov dword [0x51a104], esi
mov dword [0x4cc074], 0x4d3b28
lea eax, [edx + 1]
mov dword [0x4cc07c], eax
jmp 0x415673
mov dword [0x4cc070], ebx
jmp 0x41573e
add ebx, 1
mov dword [0x51a104], edx
mov dword [0x4cc07c], ebx
add esp, 0x2c
mov ebx, 1
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
and esi, 0xfffffffe
cmp dl, 0x2b
jne 0x415688
jmp 0x415683
and esi, 0xfffffffe
cmp dl, 0x2b
jne 0x415519
xor eax, eax
jmp 0x415683
mov dword [esp], edi
mov edx, esi
sub esi, ebp
mov ecx, ebx
mov eax, ebp
sub ebx, esi
call fcn.00414fc0
mov dword [0x4cc07c], ebx
jmp 0x41565a
cmp al, 0x3a
je 0x415a16
mov dword [esp + 4], eax
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_strchr
test eax, eax
setne al
movzx eax, al
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x1c]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x44]
mov dword [esp], eax
mov eax, edi
call fcn.00415120
mov ebx, eax
cmp eax, 0xffffffff
jne 0x415b0f
mov ecx, dword [0x4cc074]
movzx eax, byte [ecx]
lea esi, [ecx + 1]
movsx ebx, al
mov dword [0x4cc074], esi
cmp al, 0x3a
je 0x415585
cmp ebx, 0x2d
je 0x415bbe
mov eax, dword [esp + 0x1c]
mov dword [esp + 4], ebx
mov dword [esp + 0x14], ecx
mov dword [esp], eax
call sub.msvcrt.dll_strchr
mov ecx, dword [esp + 0x14]
test eax, eax
je 0x415585
cmp dword [esp + 0x40], 0
movzx edx, byte [eax + 1]
je 0x41594c
cmp ebx, 0x57
jne 0x41594c
cmp dl, 0x3b
je 0x415a1d
cmp dl, 0x3a
je 0x4157ee
cmp byte [ecx + 1], 0
jne 0x415673
add dword [0x4cc07c], 1
jmp 0x415673
add dword [esp + 0x1c], 1
or esi, 2
mov dword [0x51a104], 0
jmp 0x415747
mov ecx, dword [0x4cc070]
mov dword [esp + 0x14], ecx
cmp ecx, 0xffffffff
je 0x4159a3
cmp dword [0x4cc06c], 0xffffffff
je 0x415a9f
lea ecx, [edx + 1]
mov dword [0x4cc074], ecx
cmp al, 0x2d
je 0x415b1e
cmp dword [esp + 0x40], 0
je 0x415aaa
cmp ecx, dword [edi + ebx*4]
jne 0x415563
lea esi, [edx + 2]
movsx ebx, al
mov dword [0x4cc074], esi
cmp al, 0x3a
jne 0x415913
jmp 0x415580
mov ebx, 0x2d
jmp 0x415592
mov dword [esp + 8], ebx
mov dword [esp + 4], str.unknown_option_____c
mov eax, dword [edi]
mov dword [esp], eax
call fcn.004150a0
jmp 0x4155a8
add ecx, 1
mov dword [0x4cc074], ecx
xor eax, eax
jmp 0x4158c8
cmp byte [ecx + 1], 0
jne 0x415aef
mov eax, dword [0x4cc07c]
add eax, 1
mov dword [0x4cc07c], eax
cmp eax, ebp
jl 0x415ae7
mov edx, dword [0x4cc080]
mov dword [0x4cc074], 0x4d3b28
test edx, edx
je 0x415a73
mov eax, dword [esp + 0x1c]
cmp byte [eax], 0x3a
je 0x415a73
mov dword [esp + 8], 0x57
mov dword [esp + 4], str.option_requires_an_argument_____c
mov eax, dword [edi]
mov dword [esp], eax
call fcn.004150a0
mov dword [0x4cc078], 0x57
mov eax, dword [esp + 0x1c]
cmp byte [eax], 0x3a
jne 0x4155ae
mov ebx, 0x3a
jmp 0x415673
mov dword [0x4cc06c], ebx
jmp 0x4157a6
mov dword [0x4cc06c], ebx
jmp 0x4159a3
lea esi, [edx + 2]
movsx ebx, al
mov dword [0x4cc074], esi
cmp al, 0x3a
je 0x415580
mov eax, dword [esp + 0x1c]
mov dword [esp + 4], ebx
mov dword [esp + 0x14], ecx
mov dword [esp], eax
call sub.msvcrt.dll_strchr
mov ecx, dword [esp + 0x14]
test eax, eax
je 0x415585
movzx edx, byte [eax + 1]
jmp 0x41594c
mov eax, dword [edi + eax*4]
mov dword [0x4cc074], eax
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x40]
mov dword [esp + 4], 0
mov edx, dword [esp + 0x1c]
mov dword [esp], eax
mov eax, edi
call fcn.00415120
mov ebx, eax
mov dword [0x4cc074], 0x4d3b28
jmp 0x415673
cmp byte [edx + 2], 0
je 0x415bc5
cmp dword [esp + 0x40], 0
je 0x415b38
cmp dword [edi + ebx*4], ecx
jne 0x415a0d
lea esi, [edx + 2]
mov edx, ecx
mov dword [0x4cc074], esi
jmp 0x4157af
cmp byte [eax + 2], 0x3a
je 0x41580e
add edx, 1
mov dword [0x4cc07c], edx
cmp ebp, edx
jle 0x415b74
mov eax, dword [edi + edx*4]
mov dword [0x51a104], eax
jmp 0x41580e
mov eax, dword [0x4cc080]
mov dword [0x4cc074], 0x4d3b28
test eax, eax
je 0x415ba6
mov eax, dword [esp + 0x1c]
cmp byte [eax], 0x3a
je 0x415ba6
mov dword [esp + 8], ebx
mov dword [esp + 4], str.option_requires_an_argument_____c
mov eax, dword [edi]
mov dword [esp], eax
call fcn.004150a0
mov eax, dword [esp + 0x1c]
mov dword [0x4cc078], ebx
cmp byte [eax], 0x3a
jne 0x4155ae
jmp 0x415a8a
mov edx, ecx
jmp 0x4157af
mov esi, dword [0x4cc06c]
add ebx, 1
mov dword [0x4cc074], 0x4d3b28
mov dword [0x4cc07c], ebx
cmp esi, 0xffffffff
je 0x41565a
mov dword [esp], edi
mov edi, dword [esp + 0x14]
mov edx, esi
mov ecx, ebx
sub esi, edi
mov eax, edi
call fcn.00414fc0
sub ebx, esi
mov dword [0x4cc07c], ebx
jmp 0x41565a
mov eax, dword [esp + 4]
mov edx, dword [esp + 8]
mov dword [esp + 4], 0
mov ecx, dword [esp + 0xc]
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
jmp 0x4154b0