Function at 0x4057e4
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x405e99
call sub.msvcrt.dll__errno
mov eax, dword [eax]
mov dword [ebp - 0x44], eax
mov dword [esp], 0x41c140
call fcn.00406300
test eax, eax
jne 0x405eb1
mov eax, dword [ebp + 8]
test eax, eax
je 0x405de5
mov eax, dword [0x427110]
test eax, eax
je 0x405971
mov eax, dword [0x427ed0]
mov ebx, eax
mov dword [ebp - 0x30], eax
test eax, eax
je 0x405b8b
mov esi, dword [ebp + 8]
jmp 0x405858
js 0x405b84
mov ebx, dword [ebx]
test ebx, ebx
je 0x405ba6
lea eax, [ebx + 0xc]
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x405848
mov dword [ebp - 0x30], ebx
mov eax, dword [ebx + 4]
mov dword [ebp - 0x38], eax
mov al, byte [eax]
cmp al, 0x2f
je 0x405943
cmp al, 0x5c
je 0x405943
and eax, 0xffffffdf
sub eax, 0x41
cmp al, 0x19
ja 0x40589d
mov eax, dword [ebp - 0x38]
cmp byte [eax + 1], 0x3a
je 0x405943
xor eax, eax
mov ecx, 0xffffffff
mov edi, dword [ebp - 0x38]
repne scasb al, byte es:[edi]
mov dword [ebp - 0x2c], ecx
not dword [ebp - 0x2c]
mov ebx, 0x106
mov edi, 0x10
jmp 0x4058d2
call sub.msvcrt.dll__errno
cmp dword [eax], 0x22
jne 0x405b21
mov eax, ebx
shr eax, 1
lea ebx, [ebx + eax + 0x20]
mov eax, dword [ebp - 0x2c]
lea eax, [ebx + eax + 0x1e]
xor edx, edx
div edi
shl eax, 4
call fcn.00413290
sub esp, eax
lea esi, [esp + 0x23]
and esi, 0xfffffff0
call sub.msvcrt.dll__errno
mov dword [eax], 0
mov dword [esp + 4], ebx
mov dword [esp], esi
call sub.msvcrt.dll__getcwd
test eax, eax
je 0x4058bc
mov dword [esp + 4], 0
mov dword [esp], esi
call sub.msvcrt.dll_strchr
mov ecx, 0x41e0fc
nop
inc eax
inc ecx
mov dl, byte [ecx - 1]
mov byte [eax - 1], dl
test dl, dl
jne 0x405920
mov edx, dword [ebp - 0x38]
jmp 0x405935
inc eax
inc edx
mov cl, byte [edx - 1]
mov byte [eax - 1], cl
test cl, cl
jne 0x405934
mov dword [ebp - 0x38], esi
cmp dword [ebp + 0x1c], 3
je 0x405b9c
jg 0x405980
cmp dword [ebp + 0x1c], 1
je 0x405df2
jg 0x405bb5
mov eax, dword [ebp + 0x1c]
test eax, eax
jne 0x405e06
mov ebx, 0x41e13d
jmp 0x4059a2
mov dword [0x427110], 0xffffffff
jmp 0x40582e
cmp dword [ebp + 0x1c], 5
je 0x405dfc
jl 0x405bbf
cmp dword [ebp + 0x1c], 0x6c1
jne 0x405e06
mov ebx, 0x41e131
mov dword [esp + 4], ebx
mov eax, dword [ebp + 0x1c]
mov dword [esp], eax
call fcn.004083cc
mov edx, eax
mov dword [ebp - 0x2c], 0
test eax, eax
je 0x405e86
mov ecx, 2
mov esi, edx
mov edi, 0x41e14f
repe cmpsb byte [esi], byte es:[edi]
jne 0x405cb3
mov esi, 0xffffffff
xor eax, eax
mov ecx, esi
mov edi, dword [ebp + 8]
repne scasb al, byte es:[edi]
not ecx
lea edi, [ecx - 1]
mov dword [ebp - 0x3c], edi
mov ecx, esi
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
mov edi, dword [ebp - 0x3c]
lea eax, [edi + ecx + 0x22]
and eax, 0xfffffff0
call fcn.00413290
sub esp, eax
lea eax, [esp + 0x23]
mov dword [ebp - 0x34], eax
and dword [ebp - 0x34], 0xfffffff0
mov eax, dword [ebp - 0x34]
jmp 0x405a1a
mov eax, esi
lea esi, [eax + 1]
inc ebx
mov cl, byte [ebx - 1]
mov byte [esi - 1], cl
test cl, cl
jne 0x405a18
mov ebx, 0x41e0fc
jmp 0x405a33
mov eax, esi
inc esi
inc ebx
mov cl, byte [ebx - 1]
mov byte [esi - 1], cl
test cl, cl
jne 0x405a30
mov edi, eax
mov esi, dword [ebp + 8]
mov ecx, dword [ebp - 0x3c]
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x41e14b
lea esi, [esi]
inc edi
inc ecx
mov al, byte [ecx - 1]
mov byte [edi - 1], al
test al, al
jne 0x405a50
mov ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
lea eax, [ecx + 0x1e]
and eax, 0xfffffff0
call fcn.00413290
sub esp, eax
lea eax, [esp + 0x23]
mov dword [ebp - 0x2c], eax
and dword [ebp - 0x2c], 0xfffffff0
mov ebx, edx
lea esi, [esi]
mov al, byte [ebx]
cmp al, 0x3a
je 0x405c50
test al, al
jne 0x405bcc
mov eax, dword [ebp - 0x2c]
mov byte [eax], 0x43
mov byte [eax + 1], 0
mov esi, dword [ebp - 0x2c]
mov edi, 0x41e14f
mov ecx, 2
repe cmpsb byte [esi], byte es:[edi]
je 0x405b21
mov edi, str.POSIX
mov ecx, 6
mov esi, dword [ebp - 0x2c]
repe cmpsb byte [esi], byte es:[edi]
je 0x405b21
mov esi, dword [ebp - 0x30]
mov dword [esp + 0xc], esi
mov eax, dword [ebp - 0x34]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call fcn.0040f284
mov edi, eax
test eax, eax
je 0x405a84
lea eax, [ebp - 0x1c]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 1
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov dword [esp], edi
call fcn.00404fa8
test eax, eax
je 0x405c58
mov ebx, edi
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0xffffffff
jne 0x405cf3
mov dword [esp], 0x41c140
call fcn.00406578
test eax, eax
jne 0x405eb1
cmp dword [0x427110], 1
je 0x405b57
mov dword [esp], str.GETTEXT_LOG_UNTRANSLATED
call sub.msvcrt.dll_getenv
test eax, eax
je 0x405b57
cmp byte [eax], 0
jne 0x405e10
call sub.msvcrt.dll__errno
mov edi, dword [ebp - 0x44]
mov dword [eax], edi
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x405b79
cmp dword [ebp + 0x18], 1
je 0x405b79
mov eax, dword [ebp + 0x10]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp + 0xc]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x38], 0x41e179
cmp dword [ebp + 0x1c], 3
jne 0x40594d
mov ebx, 0x41e112
jmp 0x4059a2
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x38], 0x41e179
jmp 0x405943
mov ebx, 0x41e109
jmp 0x4059a2
mov ebx, 0x41e11e
jmp 0x4059a2
mov edx, dword [ebp - 0x2c]
jmp 0x405bd8
cmp al, 0x3a
je 0x405be3
inc edx
inc ebx
mov byte [edx - 1], al
mov al, byte [ebx]
test al, al
jne 0x405bd4
mov byte [edx], 0
cmp dword [0x427110], 1
jne 0x405aa0
mov dword [esp + 4], 0x2f
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call sub.msvcrt.dll_strchr
test eax, eax
jne 0x405a84
mov dword [esp + 4], 0x5c
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call sub.msvcrt.dll_strchr
test eax, eax
jne 0x405a84
mov eax, dword [ebp - 0x2c]
mov al, byte [eax]
and eax, 0xffffffdf
sub eax, 0x41
cmp al, 0x19
ja 0x405aa0
mov eax, dword [ebp - 0x2c]
cmp byte [eax + 1], 0x3a
jne 0x405aa0
jmp 0x405a84
inc ebx
jmp 0x405a84
mov eax, dword [edi + 0x10]
test eax, eax
je 0x405a84
xor esi, esi
mov dword [ebp - 0x40], ebx
mov ebx, dword [ebp - 0x30]
jmp 0x405c79
inc esi
mov eax, dword [edi + esi*4 + 0x10]
test eax, eax
je 0x405cab
lea ecx, [ebp - 0x1c]
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], 1
mov ecx, dword [ebp + 0xc]
mov dword [esp + 8], ecx
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.00404fa8
test eax, eax
je 0x405c70
mov dword [ebp - 0x2c], eax
mov ebx, dword [edi + esi*4 + 0x10]
jmp 0x405b17
mov ebx, dword [ebp - 0x40]
jmp 0x405a84
mov dword [ebp - 0x34], edx
mov dword [esp], str.LANGUAGE
call sub.msvcrt.dll_getenv
test eax, eax
mov edx, dword [ebp - 0x34]
je 0x405cce
cmp byte [eax], 0
jne 0x405cec
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x4059d6
mov dword [ebp - 0x2c], edx
call fcn.00406914
test eax, eax
mov edx, dword [ebp - 0x2c]
je 0x4059d6
mov edx, eax
jmp 0x4059d6
xor eax, eax
mov ecx, 0xffffffff
mov edi, dword [ebp + 0xc]
repne scasb al, byte es:[edi]
not ecx
mov eax, dword [ebp - 0x3c]
lea eax, [eax + ecx + 0x19]
mov dword [ebp - 0x30], ecx
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov edx, eax
test eax, eax
je 0x405db5
lea eax, [eax + 0x18]
mov edi, eax
mov esi, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x30]
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp - 0x3c]
inc eax
mov ecx, eax
mov dword [ebp - 0x30], edi
mov esi, dword [ebp + 8]
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x30]
mov dword [edx], edi
mov eax, dword [ebp + 0x1c]
mov dword [edx + 4], eax
mov eax, dword [0x427ecc]
mov dword [edx + 8], eax
mov dword [edx + 0xc], ebx
mov eax, dword [ebp - 0x2c]
mov dword [edx + 0x10], eax
mov eax, dword [ebp - 0x1c]
mov dword [edx + 0x14], eax
mov dword [ebp - 0x30], edx
mov dword [esp], 0x41c1a0
call fcn.00406440
test eax, eax
jne 0x405eb1
mov dword [esp + 8], 0x404f44
mov dword [esp + 4], 0x427114
mov edx, dword [ebp - 0x30]
mov dword [esp], edx
call fcn.00414b70
mov esi, eax
mov dword [esp], 0x41c1a0
call fcn.00406578
test eax, eax
jne 0x405eb1
test esi, esi
mov edx, dword [ebp - 0x30]
je 0x405ea4
cmp edx, dword [esi]
jne 0x405ea4
call sub.msvcrt.dll__errno
mov edi, dword [ebp - 0x44]
mov dword [eax], edi
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x405e39
mov dword [esp], 0x41c140
call fcn.00406578
test eax, eax
jne 0x405eb1
mov eax, dword [ebp - 0x2c]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [str.messages]
mov dword [ebp + 8], eax
jmp 0x405821
mov ebx, 0x41e0fe
jmp 0x4059a2
mov ebx, 0x41e129
jmp 0x4059a2
mov ebx, 0x41e144
jmp 0x4059a2
mov edi, dword [ebp + 0x14]
mov dword [esp + 0x10], edi
mov edi, dword [ebp + 0x10]
mov dword [esp + 0xc], edi
mov edi, dword [ebp + 0xc]
mov dword [esp + 8], edi
mov edi, dword [ebp + 8]
mov dword [esp + 4], edi
mov dword [esp], eax
call fcn.00408584
jmp 0x405b57
mov esi, dword [ebp - 0x1c]
mov edi, dword [ebx + 8]
mov eax, dword [edi + 0x84]
mov edx, dword [ebp + 0x18]
call fcn.00404df8
cmp eax, dword [edi + 0x88]
jae 0x405ea0
mov edi, eax
mov ecx, dword [ebp - 0x2c]
mov eax, ecx
add esi, ecx
jmp 0x405e7a
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_strchr
inc eax
dec edi
cmp eax, esi
jae 0x405dc6
test edi, edi
jne 0x405e60
mov dword [ebp - 0x2c], eax
jmp 0x405dc6
call fcn.004083d0
mov edx, eax
mov dword [ebp - 0x2c], 1
jmp 0x4059c2
xor eax, eax
jmp 0x405b71
xor eax, eax
jmp 0x405e55
mov dword [esp], edx
call fcn.0041ab20
jmp 0x405db5
call sub.msvcrt.dll_abort
nop
nop