Function at 0x410810
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 0x41059a
mov ebx, dword [0x4ba078]
mov eax, dword [0x4ba064]
mov edi, edx
test ebx, ebx
je 0x410410
cmp eax, 0xffffffff
je 0x410424
mov edx, dword [0x5070f4]
test edx, edx
jne 0x410424
mov eax, dword [esp + 0x1c]
movzx eax, byte [eax]
cmp al, 0x2d
je 0x410466
mov ecx, dword [0x4ba064]
test ecx, ecx
jne 0x410550
cmp al, 0x2b
je 0x4105e8
mov dword [0x5070f0], 0
test edx, edx
je 0x410317
mov dword [0x4ba068], 0xffffffff
mov dword [0x4ba06c], 0xffffffff
mov ebx, dword [0x4ba078]
mov dword [0x5070f4], 0
cmp ebx, ebp
jge 0x410560
mov edx, dword [edi + ebx*4]
cmp byte [edx], 0x2d
je 0x410478
mov dword [0x4ba070], 0x4c1028
test esi, 2
jne 0x4105b0
test esi, 1
je 0x41059a
mov eax, dword [0x4ba06c]
cmp eax, 0xffffffff
je 0x410540
mov edx, dword [0x4ba068]
cmp edx, 0xffffffff
je 0x41030e
mov dword [esp], edi
mov ecx, ebx
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], eax
call fcn.0040fd30
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov dword [0x4ba068], 0xffffffff
sub edx, eax
mov eax, ebx
sub eax, edx
mov dword [0x4ba06c], eax
add ebx, 1
mov dword [0x4ba078], ebx
mov ecx, dword [0x4ba070]
movsx eax, byte [ecx]
test al, al
je 0x410280
mov edx, dword [esp + 0x40]
test edx, edx
je 0x41039a
mov edx, dword [0x4ba078]
cmp dword [edi + edx*4], ecx
je 0x41039a
cmp al, 0x2d
je 0x4106cc
and esi, 4
je 0x410670
cmp al, 0x3a
je 0x4106d5
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.0040fe80
mov ebx, eax
cmp eax, 0xffffffff
jne 0x410787
mov ecx, dword [0x4ba070]
movzx eax, byte [ecx]
lea esi, [ecx + 1]
movsx ebx, al
mov dword [0x4ba070], esi
cmp al, 0x3a
je 0x410684
cmp ebx, 0x2d
je 0x4107fe
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 0x410684
cmp dword [esp + 0x40], 0
movzx edx, byte [eax + 1]
je 0x4103f0
cmp ebx, 0x57
jne 0x4103f0
cmp dl, 0x3b
je 0x4106dc
cmp dl, 0x3a
je 0x410506
cmp byte [ecx + 1], 0
jne 0x41059f
add dword [0x4ba078], 1
jmp 0x41059f
mov dword [0x5070f4], 1
mov dword [0x4ba078], 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 [0x5070f4]
sub esp, 0xc
test eax, eax
setne al
movzx eax, al
mov dword [0x4ba064], eax
mov eax, dword [esp + 0x1c]
movzx eax, byte [eax]
cmp al, 0x2d
jne 0x410244
or esi, 2
add dword [esp + 0x1c], 1
jmp 0x41025a
movsx eax, byte [edx + 1]
test al, al
jne 0x4105f0
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 0x4102a4
cmp dword [0x4ba06c], 0xffffffff
je 0x4104be
cmp dword [0x4ba068], 0xffffffff
je 0x410749
lea esi, [edx + 1]
mov dword [0x4ba070], esi
cmp byte [edx + 1], 0
mov dword [esp + 0x14], edx
jne 0x4106b3
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 0x41059a
cmp byte [eax + 1], 0x3a
mov ebx, 0x2d
mov ecx, edx
jne 0x410403
mov dword [0x5070f0], 0
cmp byte [ecx + 1], 0
mov edx, dword [0x4ba078]
je 0x410796
mov dword [0x5070f0], esi
mov dword [0x4ba070], 0x4c1028
add edx, 1
mov dword [0x4ba078], edx
jmp 0x41059f
mov dword [0x4ba06c], ebx
jmp 0x41030e
and esi, 0xfffffffe
cmp al, 0x2b
jne 0x41025a
jmp 0x410469
mov esi, dword [0x4ba068]
mov ebp, dword [0x4ba06c]
mov dword [0x4ba070], 0x4c1028
cmp esi, 0xffffffff
jne 0x4105ce
cmp ebp, 0xffffffff
je 0x410586
mov dword [0x4ba078], ebp
mov dword [0x4ba068], 0xffffffff
mov dword [0x4ba06c], 0xffffffff
mov ebx, 0xffffffff
add esp, 0x2c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
add ebx, 1
mov dword [0x5070f0], edx
mov dword [0x4ba078], ebx
add esp, 0x2c
mov ebx, 1
mov eax, ebx
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.0040fd30
mov dword [0x4ba078], ebx
jmp 0x410586
and esi, 0xfffffffe
jmp 0x410469
mov ecx, dword [0x4ba06c]
mov dword [esp + 0x14], ecx
cmp ecx, 0xffffffff
je 0x41060c
cmp dword [0x4ba068], 0xffffffff
je 0x410754
lea ecx, [edx + 1]
mov dword [0x4ba070], ecx
cmp al, 0x2d
jne 0x410328
cmp byte [edx + 2], 0
jne 0x410328
mov esi, dword [0x4ba068]
add ebx, 1
mov dword [0x4ba070], 0x4c1028
mov dword [0x4ba078], ebx
cmp esi, 0xffffffff
je 0x410586
mov dword [esp], edi
mov edi, dword [esp + 0x14]
mov edx, esi
mov ecx, ebx
sub esi, edi
mov eax, edi
call fcn.0040fd30
sub ebx, esi
mov dword [0x4ba078], ebx
jmp 0x410586
lea esi, [ecx + 1]
movsx ebx, al
mov dword [0x4ba070], esi
cmp al, 0x3a
jne 0x4103b7
cmp byte [ecx + 1], 0
jne 0x410691
add dword [0x4ba078], 1
mov eax, dword [0x4ba07c]
test eax, eax
je 0x4106a3
mov eax, dword [esp + 0x1c]
cmp byte [eax], 0x3a
jne 0x4106ba
mov dword [0x4ba074], ebx
mov ebx, 0x3f
jmp 0x41059f
mov ebx, 0x2d
jmp 0x410691
mov dword [esp + 4], ebx
mov dword [esp], str.unknown_option_____c
call fcn.0040fe00
jmp 0x4106a3
add ecx, 1
mov dword [0x4ba070], ecx
xor eax, eax
jmp 0x41036c
cmp byte [ecx + 1], 0
jne 0x410767
mov eax, dword [0x4ba078]
add eax, 1
mov dword [0x4ba078], eax
cmp eax, ebp
jl 0x41075f
mov edx, dword [0x4ba07c]
mov dword [0x4ba070], 0x4c1028
test edx, edx
je 0x410728
mov eax, dword [esp + 0x1c]
cmp byte [eax], 0x3a
je 0x410728
mov dword [esp + 4], 0x57
mov dword [esp], str.option_requires_an_argument_____c
call fcn.0040fe00
mov dword [0x4ba074], 0x57
mov eax, dword [esp + 0x1c]
cmp byte [eax], 0x3a
jne 0x4106a9
mov ebx, 0x3a
jmp 0x41059f
mov dword [0x4ba068], ebx
jmp 0x4104be
mov dword [0x4ba068], ebx
jmp 0x41060c
mov eax, dword [edi + eax*4]
mov dword [0x4ba070], 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.0040fe80
mov ebx, eax
mov dword [0x4ba070], 0x4c1028
jmp 0x41059f
cmp byte [eax + 2], 0x3a
je 0x410526
add edx, 1
mov dword [0x4ba078], edx
cmp ebp, edx
jle 0x4107ba
mov eax, dword [edi + edx*4]
mov dword [0x5070f0], eax
jmp 0x410526
mov eax, dword [0x4ba07c]
mov dword [0x4ba070], 0x4c1028
test eax, eax
je 0x4107e6
mov eax, dword [esp + 0x1c]
cmp byte [eax], 0x3a
je 0x4107e6
mov dword [esp + 4], ebx
mov dword [esp], str.option_requires_an_argument_____c
call fcn.0040fe00
mov eax, dword [esp + 0x1c]
mov dword [0x4ba074], ebx
cmp byte [eax], 0x3a
jne 0x4106a9
jmp 0x41073f
mov edx, ecx
jmp 0x4104c7
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 0x4101f0