Function at 0x4891d0
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 0x488f3a
mov ebx, dword [0x494078]
mov eax, dword [0x494064]
mov edi, edx
test ebx, ebx
je 0x488db0
cmp eax, 0xffffffff
je 0x488dc4
mov edx, dword [0x52c4a0]
test edx, edx
jne 0x488dc4
mov eax, dword [esp + 0x1c]
movzx eax, byte [eax]
cmp al, 0x2d
je 0x488e06
mov ecx, dword [0x494064]
test ecx, ecx
jne 0x488ef0
cmp al, 0x2b
je 0x488fd0
mov dword [0x52c49c], 0
test edx, edx
je 0x488cb7
mov dword [0x494068], 0xffffffff
mov dword [0x49406c], 0xffffffff
mov ebx, dword [0x494078]
mov dword [0x52c4a0], 0
cmp ebx, ebp
jge 0x488f00
mov edx, dword [edi + ebx*4]
cmp byte [edx], 0x2d
je 0x488e18
mov dword [0x494070], 0x4c25e8
test esi, 2
jne 0x488f50
test esi, 1
je 0x488f3a
mov eax, dword [0x49406c]
cmp eax, 0xffffffff
je 0x488ee0
mov edx, dword [0x494068]
cmp edx, 0xffffffff
je 0x488cae
mov dword [esp], edi
mov ecx, ebx
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], eax
call fcn.004886d0
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov dword [0x494068], 0xffffffff
sub edx, eax
mov eax, ebx
sub eax, edx
mov dword [0x49406c], eax
add ebx, 1
mov dword [0x494078], ebx
mov ecx, dword [0x494070]
movsx eax, byte [ecx]
test al, al
je 0x488c20
mov edx, dword [esp + 0x40]
test edx, edx
je 0x488d3a
mov edx, dword [0x494078]
cmp dword [edi + edx*4], ecx
je 0x488d3a
cmp al, 0x2d
je 0x48906d
and esi, 4
je 0x488f88
cmp al, 0x3a
je 0x489076
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.00488820
mov esi, eax
cmp eax, 0xffffffff
jne 0x489128
mov ecx, dword [0x494070]
movzx eax, byte [ecx]
lea ebx, [ecx + 1]
movsx esi, al
mov dword [0x494070], ebx
cmp al, 0x3a
je 0x488f9c
cmp esi, 0x2d
je 0x488e6e
mov eax, dword [esp + 0x1c]
mov dword [esp + 4], esi
mov dword [esp + 0x14], ecx
mov dword [esp], eax
call sub.msvcrt.dll_strchr
mov ecx, dword [esp + 0x14]
test eax, eax
mov edx, eax
je 0x488f9c
cmp dword [esp + 0x40], 0
movzx eax, byte [eax + 1]
je 0x488d91
cmp esi, 0x57
jne 0x488d91
cmp al, 0x3b
je 0x48907d
cmp al, 0x3a
je 0x488ea8
cmp byte [ecx + 1], 0
jne 0x488f3f
add dword [0x494078], 1
jmp 0x488f3f
mov dword [0x52c4a0], 1
mov dword [0x494078], 1
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], str.POSIXLY_CORRECT
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentVariableW]
mov edx, dword [0x52c4a0]
sub esp, 0xc
test eax, eax
setne al
movzx eax, al
mov dword [0x494064], eax
mov eax, dword [esp + 0x1c]
movzx eax, byte [eax]
cmp al, 0x2d
jne 0x488be4
or esi, 2
add dword [esp + 0x1c], 1
jmp 0x488bfa
movsx eax, byte [edx + 1]
test al, al
jne 0x488fd8
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 0x488c44
cmp dword [0x49406c], 0xffffffff
je 0x488e5e
cmp dword [0x494068], 0xffffffff
je 0x4890ea
lea ebx, [edx + 1]
mov ecx, edx
mov esi, 0x2d
mov dword [0x494070], ebx
cmp byte [ecx + 1], 0
mov dword [esp + 0x14], ecx
jne 0x488fa9
mov eax, dword [esp + 0x1c]
mov dword [esp + 4], 0x2d
mov dword [esp], eax
call sub.msvcrt.dll_strchr
mov ecx, dword [esp + 0x14]
test eax, eax
mov edx, eax
je 0x488f3a
cmp byte [eax + 1], 0x3a
jne 0x488da3
mov dword [0x52c49c], 0
cmp byte [ecx + 1], 0
mov eax, dword [0x494078]
je 0x489137
mov dword [0x52c49c], ebx
mov dword [0x494070], 0x4c25e8
add eax, 1
mov dword [0x494078], eax
jmp 0x488f3f
mov dword [0x49406c], ebx
jmp 0x488cae
and esi, 0xfffffffe
cmp al, 0x2b
jne 0x488bfa
jmp 0x488e09
mov esi, dword [0x494068]
mov ebp, dword [0x49406c]
mov dword [0x494070], 0x4c25e8
cmp esi, 0xffffffff
jne 0x488f6e
cmp ebp, 0xffffffff
je 0x488f26
mov dword [0x494078], ebp
mov dword [0x494068], 0xffffffff
mov dword [0x49406c], 0xffffffff
mov esi, 0xffffffff
add esp, 0x2c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
add ebx, 1
mov esi, 1
mov dword [0x52c49c], edx
mov dword [0x494078], ebx
add esp, 0x2c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], edi
mov edx, esi
sub esi, ebp
mov ecx, ebx
mov eax, ebp
sub ebx, esi
call fcn.004886d0
mov dword [0x494078], ebx
jmp 0x488f26
lea ebx, [ecx + 1]
movsx esi, al
mov dword [0x494070], ebx
cmp al, 0x3a
jne 0x488d57
cmp byte [ecx + 1], 0
jne 0x488fa9
add dword [0x494078], 1
mov eax, dword [0x49407c]
test eax, eax
je 0x488fbf
mov eax, dword [esp + 0x1c]
cmp byte [eax], 0x3a
jne 0x489058
mov dword [0x494074], esi
mov esi, 0x3f
jmp 0x488f3f
and esi, 0xfffffffe
jmp 0x488e09
mov ecx, dword [0x49406c]
mov dword [esp + 0x14], ecx
cmp ecx, 0xffffffff
je 0x488ff4
cmp dword [0x494068], 0xffffffff
je 0x4890f5
lea ecx, [edx + 1]
mov dword [0x494070], ecx
cmp al, 0x2d
jne 0x488cc8
cmp byte [edx + 2], 0
jne 0x488cc8
mov esi, dword [0x494068]
add ebx, 1
mov dword [0x494070], 0x4c25e8
mov dword [0x494078], ebx
cmp esi, 0xffffffff
je 0x488f26
mov dword [esp], edi
mov edi, dword [esp + 0x14]
mov edx, esi
mov ecx, ebx
sub esi, edi
mov eax, edi
call fcn.004886d0
sub ebx, esi
mov dword [0x494078], ebx
jmp 0x488f26
mov dword [esp + 4], esi
mov dword [esp], str.unknown_option_____c
call fcn.004887a0
jmp 0x488fbf
add ecx, 1
mov dword [0x494070], ecx
xor eax, eax
jmp 0x488d0c
cmp byte [ecx + 1], 0
jne 0x489108
mov eax, dword [0x494078]
add eax, 1
mov dword [0x494078], eax
cmp eax, ebp
jl 0x489100
mov edx, dword [0x49407c]
mov dword [0x494070], 0x4c25e8
test edx, edx
je 0x4890c9
mov eax, dword [esp + 0x1c]
cmp byte [eax], 0x3a
je 0x4890c9
mov dword [esp + 4], 0x57
mov dword [esp], str.option_requires_an_argument_____c
call fcn.004887a0
mov dword [0x494074], 0x57
mov eax, dword [esp + 0x1c]
cmp byte [eax], 0x3a
jne 0x488fc5
mov esi, 0x3a
jmp 0x488f3f
mov dword [0x494068], ebx
jmp 0x488e5e
mov dword [0x494068], ebx
jmp 0x488ff4
mov eax, dword [edi + eax*4]
mov dword [0x494070], 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.00488820
mov esi, eax
mov dword [0x494070], 0x4c25e8
jmp 0x488f3f
cmp byte [edx + 2], 0x3a
je 0x488ec7
add eax, 1
mov dword [0x494078], eax
cmp ebp, eax
jle 0x48915b
mov edx, dword [edi + eax*4]
mov dword [0x52c49c], edx
jmp 0x488ec7
mov eax, dword [0x49407c]
mov dword [0x494070], 0x4c25e8
test eax, eax
je 0x489187
mov eax, dword [esp + 0x1c]
cmp byte [eax], 0x3a
je 0x489187
mov dword [esp + 4], esi
mov dword [esp], str.option_requires_an_argument_____c
call fcn.004887a0
mov eax, dword [esp + 0x1c]
mov dword [0x494074], esi
cmp byte [eax], 0x3a
jne 0x488fc5
jmp 0x4890e0
push ebx
mov ebx, dword [esp + 0x18]
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0xc], ebx
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x10], 1
mov dword [esp + 8], ebx
pop ebx
jmp 0x488b90