Function at 0x497da8
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 0x49845d
call sub.msvcrt.dll__errno
mov eax, dword [eax]
mov dword [ebp - 0x44], eax
mov dword [esp], 0x4aa460
call fcn.004987c0
test eax, eax
jne 0x498475
mov eax, dword [ebp + 8]
test eax, eax
je 0x4983a9
mov eax, dword [0x4f7598]
test eax, eax
je 0x497f35
mov eax, dword [0x4f8350]
mov ebx, eax
mov dword [ebp - 0x30], eax
test eax, eax
je 0x49814f
mov esi, dword [ebp + 8]
jmp 0x497e1c
js 0x498148
mov ebx, dword [ebx]
test ebx, ebx
je 0x49816a
lea eax, [ebx + 0xc]
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x497e0c
mov dword [ebp - 0x30], ebx
mov eax, dword [ebx + 4]
mov dword [ebp - 0x38], eax
mov al, byte [eax]
cmp al, 0x2f
je 0x497f07
cmp al, 0x5c
je 0x497f07
and eax, 0xffffffdf
sub eax, 0x41
cmp al, 0x19
ja 0x497e61
mov eax, dword [ebp - 0x38]
cmp byte [eax + 1], 0x3a
je 0x497f07
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 0x497e96
call sub.msvcrt.dll__errno
cmp dword [eax], 0x22
jne 0x4980e5
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.0049e8a0
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 0x497e80
mov dword [esp + 4], 0
mov dword [esp], esi
call sub.msvcrt.dll_strchr
mov ecx, 0x4d1b0c
nop
inc eax
inc ecx
mov dl, byte [ecx - 1]
mov byte [eax - 1], dl
test dl, dl
jne 0x497ee4
mov edx, dword [ebp - 0x38]
jmp 0x497ef9
inc eax
inc edx
mov cl, byte [edx - 1]
mov byte [eax - 1], cl
test cl, cl
jne 0x497ef8
mov dword [ebp - 0x38], esi
cmp dword [ebp + 0x1c], 3
je 0x498160
jg 0x497f44
cmp dword [ebp + 0x1c], 1
je 0x4983b6
jg 0x498179
mov eax, dword [ebp + 0x1c]
test eax, eax
jne 0x4983ca
mov ebx, 0x4d1b4d
jmp 0x497f66
mov dword [0x4f7598], 0xffffffff
jmp 0x497df2
cmp dword [ebp + 0x1c], 5
je 0x4983c0
jl 0x498183
cmp dword [ebp + 0x1c], 0x6c1
jne 0x4983ca
mov ebx, str.LC_MESSAGES
mov dword [esp + 4], ebx
mov eax, dword [ebp + 0x1c]
mov dword [esp], eax
call fcn.0049a88c
mov edx, eax
mov dword [ebp - 0x2c], 0
test eax, eax
je 0x49844a
mov ecx, 2
mov esi, edx
mov edi, 0x4d1b5f
repe cmpsb byte [esi], byte es:[edi]
jne 0x498277
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.0049e8a0
sub esp, eax
lea eax, [esp + 0x23]
mov dword [ebp - 0x34], eax
and dword [ebp - 0x34], 0xfffffff0
mov eax, dword [ebp - 0x34]
jmp 0x497fde
mov eax, esi
lea esi, [eax + 1]
inc ebx
mov cl, byte [ebx - 1]
mov byte [esi - 1], cl
test cl, cl
jne 0x497fdc
mov ebx, 0x4d1b0c
jmp 0x497ff7
mov eax, esi
inc esi
inc ebx
mov cl, byte [ebx - 1]
mov byte [esi - 1], cl
test cl, cl
jne 0x497ff4
mov edi, eax
mov esi, dword [ebp + 8]
mov ecx, dword [ebp - 0x3c]
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x4d1b5b
lea esi, [esi]
inc edi
inc ecx
mov al, byte [ecx - 1]
mov byte [edi - 1], al
test al, al
jne 0x498014
mov ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
lea eax, [ecx + 0x1e]
and eax, 0xfffffff0
call fcn.0049e8a0
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 0x498214
test al, al
jne 0x498190
mov eax, dword [ebp - 0x2c]
mov byte [eax], 0x43
mov byte [eax + 1], 0
mov esi, dword [ebp - 0x2c]
mov edi, 0x4d1b5f
mov ecx, 2
repe cmpsb byte [esi], byte es:[edi]
je 0x4980e5
mov edi, str.POSIX
mov ecx, 6
mov esi, dword [ebp - 0x2c]
repe cmpsb byte [esi], byte es:[edi]
je 0x4980e5
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.0049ac3c
mov edi, eax
test eax, eax
je 0x498048
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.0049756c
test eax, eax
je 0x49821c
mov ebx, edi
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0xffffffff
jne 0x4982b7
mov dword [esp], 0x4aa460
call fcn.00498a38
test eax, eax
jne 0x498475
cmp dword [0x4f7598], 1
je 0x49811b
mov dword [esp], str.GETTEXT_LOG_UNTRANSLATED
call sub.msvcrt.dll_getenv
test eax, eax
je 0x49811b
cmp byte [eax], 0
jne 0x4983d4
call sub.msvcrt.dll__errno
mov edi, dword [ebp - 0x44]
mov dword [eax], edi
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x49813d
cmp dword [ebp + 0x18], 1
je 0x49813d
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], 0x4d1b89
cmp dword [ebp + 0x1c], 3
jne 0x497f11
mov ebx, str.LC_MONETARY
jmp 0x497f66
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x38], 0x4d1b89
jmp 0x497f07
mov ebx, str.LC_CTYPE
jmp 0x497f66
mov ebx, str.LC_NUMERIC
jmp 0x497f66
mov edx, dword [ebp - 0x2c]
jmp 0x49819c
cmp al, 0x3a
je 0x4981a7
inc edx
inc ebx
mov byte [edx - 1], al
mov al, byte [ebx]
test al, al
jne 0x498198
mov byte [edx], 0
cmp dword [0x4f7598], 1
jne 0x498064
mov dword [esp + 4], 0x2f
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call sub.msvcrt.dll_strchr
test eax, eax
jne 0x498048
mov dword [esp + 4], 0x5c
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call sub.msvcrt.dll_strchr
test eax, eax
jne 0x498048
mov eax, dword [ebp - 0x2c]
mov al, byte [eax]
and eax, 0xffffffdf
sub eax, 0x41
cmp al, 0x19
ja 0x498064
mov eax, dword [ebp - 0x2c]
cmp byte [eax + 1], 0x3a
jne 0x498064
jmp 0x498048
inc ebx
jmp 0x498048
mov eax, dword [edi + 0x10]
test eax, eax
je 0x498048
xor esi, esi
mov dword [ebp - 0x40], ebx
mov ebx, dword [ebp - 0x30]
jmp 0x49823d
inc esi
mov eax, dword [edi + esi*4 + 0x10]
test eax, eax
je 0x49826f
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.0049756c
test eax, eax
je 0x498234
mov dword [ebp - 0x2c], eax
mov ebx, dword [edi + esi*4 + 0x10]
jmp 0x4980db
mov ebx, dword [ebp - 0x40]
jmp 0x498048
mov dword [ebp - 0x34], edx
mov dword [esp], str.LANGUAGE
call sub.msvcrt.dll_getenv
test eax, eax
mov edx, dword [ebp - 0x34]
je 0x498292
cmp byte [eax], 0
jne 0x4982b0
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x497f9a
mov dword [ebp - 0x2c], edx
call fcn.00498dd4
test eax, eax
mov edx, dword [ebp - 0x2c]
je 0x497f9a
mov edx, eax
jmp 0x497f9a
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 0x498379
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 [0x4f8354]
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], 0x4aa4c0
call fcn.00498900
test eax, eax
jne 0x498475
mov dword [esp + 8], 0x497508
mov dword [esp + 4], 0x4f759c
mov edx, dword [ebp - 0x30]
mov dword [esp], edx
call fcn.004a0a30
mov esi, eax
mov dword [esp], 0x4aa4c0
call fcn.00498a38
test eax, eax
jne 0x498475
test esi, esi
mov edx, dword [ebp - 0x30]
je 0x498468
cmp edx, dword [esi]
jne 0x498468
call sub.msvcrt.dll__errno
mov edi, dword [ebp - 0x44]
mov dword [eax], edi
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x4983fd
mov dword [esp], 0x4aa460
call fcn.00498a38
test eax, eax
jne 0x498475
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 0x497de5
mov ebx, str.LC_COLLATE
jmp 0x497f66
mov ebx, str.LC_TIME
jmp 0x497f66
mov ebx, str.LC_XXX
jmp 0x497f66
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.0049aa44
jmp 0x49811b
mov esi, dword [ebp - 0x1c]
mov edi, dword [ebx + 8]
mov eax, dword [edi + 0x84]
mov edx, dword [ebp + 0x18]
call fcn.004973bc
cmp eax, dword [edi + 0x88]
jae 0x498464
mov edi, eax
mov ecx, dword [ebp - 0x2c]
mov eax, ecx
add esi, ecx
jmp 0x49843e
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_strchr
inc eax
dec edi
cmp eax, esi
jae 0x49838a
test edi, edi
jne 0x498424
mov dword [ebp - 0x2c], eax
jmp 0x49838a
call fcn.0049a890
mov edx, eax
mov dword [ebp - 0x2c], 1
jmp 0x497f86
xor eax, eax
jmp 0x498135
xor eax, eax
jmp 0x498419
mov dword [esp], edx
call sub.msvcrt.dll_free
jmp 0x498379
call sub.msvcrt.dll_abort
nop
nop