Function at 0x484ba0
Capabilities:
Query environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x303c]
mov eax, 0x303c
call fcn.0051dcc0
push 0xffffffffffffffff
push 0x53d11d
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x572844]
xor eax, ebp
mov dword [ebp + 0x3038], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ecx, dword [ebp + 0x3048]
mov eax, dword [ebp + 0x3044]
mov dword [ebp - 0x50], ecx
xor ecx, ecx
mov word [ebp + 0x2038], cx
test eax, eax
je 0x484c2a
cmp byte [ebp + 0x304c], cl
je 0x484c18
push ecx
push 1
push 0x800
lea ecx, [ebp + 0x2038]
push ecx
push eax
call fcn.00494760
jmp 0x484c2a
push 0x800
push eax
lea eax, [ebp + 0x2038]
push eax
call fcn.004b0360
lea ecx, [ebp]
call fcn.00481580
mov dword [ebp - 4], 0
cmp word [ebp + 0x2038], 0
je 0x484c90
mov bl, byte [ebp + 0x3050]
lea eax, [ebp + 0x2038]
lea ecx, [ebp]
test bl, bl
je 0x484c5e
push eax
call fcn.004827b0
jmp 0x484c66
push 0
push eax
call fcn.00481d40
test al, al
jne 0x484c97
test bl, bl
je 0x484c7a
push 6
mov ecx, 0x5b68fc
call fcn.0047aed0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp]
call fcn.004815d0
xor al, al
jmp 0x4852d2
mov dword [ebp + 0x10], 1
xor edi, edi
mov byte [ebp - 0x28], 0
mov ebx, 0x1000
mov dword [ebp - 0x34], edi
push ebx
push edi
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x34], ebx
call fcn.00525bbb
add esp, 8
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x484ccf
mov ecx, 0x5b68fc
call fcn.0047b030
mov eax, dword [ebp - 0x10]
mov esi, ebx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x30], esi
mov byte [ebp - 4], 1
lea ecx, [ebp]
push 0x1000
push eax
call fcn.00482130
test eax, eax
je 0x484d94
add ebx, eax
add edi, eax
mov dword [ebp - 0x34], ebx
cmp ebx, esi
jbe 0x484d35
mov eax, esi
add esi, 0x20
shr eax, 2
add esi, eax
cmp ebx, esi
jbe 0x484d0c
mov esi, ebx
mov eax, dword [ebp - 0x10]
push esi
push eax
call fcn.00525bbb
add esp, 8
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x484d2d
mov ecx, 0x5b68fc
call fcn.0047b030
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x30], esi
jmp 0x484d38
mov eax, dword [ebp - 0x10]
add eax, edi
lea ecx, [ebp]
push 0x1000
push eax
call fcn.00482130
test eax, eax
jne 0x484cf1
cmp edi, esi
jbe 0x484d94
mov ebx, edi
mov dword [ebp - 0x34], ebx
cmp ebx, esi
jbe 0x484d99
mov eax, esi
add esi, 0x20
shr eax, 2
add esi, eax
cmp edi, esi
jbe 0x484d69
mov esi, edi
mov eax, dword [ebp - 0x10]
push esi
push eax
call fcn.00525bbb
mov ecx, eax
add esp, 8
mov dword [ebp - 0x10], ecx
test ecx, ecx
jne 0x484d8c
mov ecx, 0x5b68fc
call fcn.0047b030
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x30], esi
jmp 0x484d9c
mov ebx, edi
mov dword [ebp - 0x34], ebx
mov ecx, dword [ebp - 0x10]
cmp edi, 2
jb 0x484e17
cmp byte [ecx], 0xff
jne 0x484e17
cmp byte [ecx + 1], 0xfe
jne 0x484e17
mov dword [ebp - 0x1c], 1
mov dword [ebp - 0x24], 0
cmp edi, 3
jb 0x484dd4
cmp byte [ecx], 0xef
jne 0x484dd4
cmp byte [ecx + 1], 0xbb
jne 0x484dd4
cmp byte [ecx + 2], 0xbf
mov byte [ebp - 0x15], 1
je 0x484dd8
mov byte [ebp - 0x15], 0
mov eax, dword [ebp + 0x3054]
test eax, eax
jne 0x484eb5
cmp edi, 3
jbe 0x484e53
cmp byte [ecx], 0xef
jne 0x484e6f
cmp byte [ecx + 1], 0xbb
jne 0x484e6f
cmp byte [ecx + 2], 0xbf
jne 0x484e6f
lea eax, [edi - 3]
push eax
lea eax, [ecx + 3]
push eax
call fcn.004b3dc0
test al, al
je 0x484e6c
mov eax, 4
jmp 0x484eaf
mov dword [ebp - 0x1c], 0
cmp edi, 2
jb 0x484db3
cmp byte [ecx], 0xfe
mov dword [ebp - 0x1c], 0
jne 0x484db3
cmp byte [ecx + 1], 0xff
mov dword [ebp - 0x1c], 0
jne 0x484db3
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x1c], 0
jmp 0x484dba
cmp edi, 2
ja 0x484e6f
xor al, al
cmp edi, 2
jbe 0x484e7c
cmp byte [ecx], 0xfe
jne 0x484e7c
cmp byte [ecx + 1], 0xff
jne 0x484e7c
jmp 0x484e80
mov ecx, dword [ebp - 0x10]
cmp byte [ecx], 0xff
jne 0x484e58
cmp byte [ecx + 1], 0xfe
jne 0x484e58
mov al, 1
test al, al
je 0x484ead
movzx eax, al
add eax, 2
cmp eax, edi
jae 0x484ead
lea ebx, [ebx]
mov dl, byte [ecx + eax]
cmp dl, 0x20
jae 0x484ea6
cmp dl, 0xd
je 0x484ea6
cmp dl, 0xa
jne 0x484f2a
add eax, 2
cmp eax, edi
jb 0x484e90
xor eax, eax
mov dword [ebp + 0x3054], eax
xor ecx, ecx
xor edx, edx
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x40], ecx
mov byte [ebp - 0x3c], cl
mov byte [ebp - 4], 2
test eax, eax
je 0x484ee4
cmp eax, 2
je 0x484ee4
cmp eax, 1
jne 0x484fa8
inc ebx
mov dword [ebp - 0x34], ebx
cmp ebx, esi
jbe 0x484f34
mov eax, esi
add esi, 0x20
shr eax, 2
add esi, eax
cmp ebx, esi
jbe 0x484efc
mov esi, ebx
mov eax, dword [ebp - 0x10]
push esi
push eax
call fcn.00525bbb
mov edi, eax
add esp, 8
mov dword [ebp - 0x10], edi
test edi, edi
jne 0x484f1c
mov ecx, 0x5b68fc
call fcn.0047b030
mov eax, dword [ebp + 0x3054]
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x30], esi
jmp 0x484f37
mov eax, 3
jmp 0x484eaf
mov edi, dword [ebp - 0x10]
mov byte [ebx + edi - 1], 0
cmp eax, 2
jne 0x484f49
push edi
push edi
call dword [sym.imp.USER32.dll_OemToCharA]
mov eax, ebx
mov dword [ebp - 0x48], eax
test ebx, ebx
je 0x484f90
test eax, eax
je 0x484f90
cmp eax, 0x20
ja 0x484f60
mov eax, 0x20
mov dword [ebp - 0x20], eax
add eax, eax
push eax
push 0
call fcn.00525bbb
add esp, 8
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x484f84
mov ecx, 0x5b68fc
call fcn.0047b030
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x48]
push eax
push dword [ebp - 0x14]
push edi
call fcn.004b3d10
mov eax, dword [ebp + 0x3054]
mov ecx, dword [ebp - 0x48]
mov edx, dword [ebp - 0x20]
jmp 0x484fab
mov edi, dword [ebp - 0x10]
cmp eax, 3
jne 0x4850a7
cmp dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], 2
jne 0x484fd3
cmp dword [ebp - 0x24], 0
jne 0x484fd3
xor eax, eax
mov dword [ebp - 0x1c], 1
mov dword [ebp - 0x20], eax
mov eax, ebx
shr eax, 1
inc eax
cmp eax, edx
jbe 0x485023
sub eax, ecx
lea esi, [ecx + eax]
mov dword [ebp - 0x48], esi
cmp esi, edx
jbe 0x485026
mov eax, edx
shr eax, 2
add eax, 0x20
add eax, edx
cmp esi, eax
ja 0x484ff8
mov esi, eax
lea eax, [esi + esi]
push eax
push dword [ebp - 0x14]
call fcn.00525bbb
add esp, 8
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x48501b
mov ecx, 0x5b68fc
call fcn.0047b030
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x44], esi
jmp 0x485026
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x20]
and ebx, 0xfffffffe
cmp eax, ebx
jae 0x485095
mov ecx, dword [ebp - 0x24]
lea edx, [edi + eax]
sub dword [ebp - 0x1c], ecx
sub ebx, eax
add edx, ecx
mov dword [ebp - 0x24], ebx
mov eax, 0x100
lea esi, [ebx - 1]
mov ebx, dword [ebp - 0x1c]
shr esi, 1
inc esi
xor edi, edi
movzx ecx, byte [ebx + edx]
lea edx, [edx + 2]
mov ebx, dword [ebp - 0x14]
movzx eax, ax
imul ecx, eax
movzx eax, byte [edx - 2]
add cx, ax
mov eax, edi
shr eax, 1
add edi, 2
movzx ecx, cx
mov word [ebx + eax*2], cx
mov eax, 0x100
mov ebx, dword [ebp - 0x1c]
sub esi, 1
jne 0x485050
mov ebx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x14]
shr ebx, 1
xor ecx, ecx
mov word [eax + ebx*2], cx
jmp 0x48515c
sub ebx, eax
mov eax, dword [ebp - 0x14]
shr ebx, 1
xor ecx, ecx
mov word [eax + ebx*2], cx
jmp 0x48515c
cmp eax, 4
jne 0x485159
inc ebx
mov dword [ebp - 0x34], ebx
cmp ebx, esi
jbe 0x4850eb
mov eax, esi
add esi, 0x20
shr eax, 2
add esi, eax
cmp ebx, esi
jbe 0x4850c8
mov esi, ebx
push esi
push edi
call fcn.00525bbb
mov edi, eax
add esp, 8
mov dword [ebp - 0x10], edi
test edi, edi
jne 0x4850e5
mov ecx, 0x5b68fc
call fcn.0047b030
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x30], esi
mov ecx, dword [ebp - 0x20]
mov byte [ebx + edi - 1], 0
cmp ebx, ecx
jbe 0x48513f
sub ebx, dword [ebp - 0x48]
add ebx, dword [ebp - 0x48]
mov dword [ebp - 0x48], ebx
cmp ebx, ecx
jbe 0x485142
mov eax, ecx
lea esi, [ecx + 0x20]
shr eax, 2
add esi, eax
cmp ebx, esi
jbe 0x485114
mov esi, ebx
lea eax, [esi + esi]
push eax
push dword [ebp - 0x14]
call fcn.00525bbb
add esp, 8
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x485137
mov ecx, 0x5b68fc
call fcn.0047b030
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x44], esi
jmp 0x485142
mov dword [ebp - 0x48], ebx
movzx eax, byte [ebp - 0x15]
neg eax
push ebx
push dword [ebp - 0x14]
sbb eax, eax
and eax, 3
add eax, edi
push eax
call fcn.004b3e80
mov eax, dword [ebp - 0x14]
mov esi, eax
movzx eax, word [eax]
test ax, ax
je 0x48529e
mov ecx, eax
lea esp, [esp]
movzx eax, cx
xor edx, edx
mov edi, esi
mov ebx, eax
cmp eax, 0xd
je 0x4851bd
mov ecx, eax
movzx ebx, cx
cmp cx, 0xa
je 0x4851bd
movzx ebx, cx
test cx, cx
je 0x4851bd
cmp byte [ebp + 0x305c], 0
je 0x4851ad
cmp cx, 0x2f
jne 0x4851ad
cmp word [edi + 2], cx
jne 0x4851ad
xor eax, eax
mov edx, edi
mov word [edi], ax
movzx eax, word [edi + 2]
add edi, 2
mov ecx, eax
mov ebx, eax
cmp eax, 0xd
jne 0x485180
xor eax, eax
mov word [edi], ax
test edx, edx
jne 0x4851c8
mov edx, edi
lea eax, [edx - 2]
cmp eax, esi
jb 0x4851e9
nop
movzx ecx, word [eax]
cmp ecx, 0x20
je 0x4851dd
cmp ecx, 9
jne 0x4851e9
xor ecx, ecx
mov word [eax], cx
sub eax, 2
cmp eax, esi
jae 0x4851d0
cmp byte [ebp + 0x3058], 0
je 0x485221
cmp word [esi], 0x22
jne 0x485221
mov ecx, esi
lea edx, [ecx + 2]
lea ecx, [ecx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x485200
sub ecx, edx
sar ecx, 1
cmp word [esi + ecx*2 - 2], 0x22
jne 0x485221
xor eax, eax
mov word [esi + ecx*2 - 2], ax
add esi, 2
cmp byte [ebp + 0x3060], 0
je 0x48526a
cmp word [esi], 0x25
jne 0x48526a
xor eax, eax
mov word [ebp + 0x1038], ax
lea eax, [ebp + 0x1038]
push 0x800
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x48526a
cmp eax, 0x800
jae 0x48526a
cmp word [ebp + 0x1038], 0
je 0x485279
lea eax, [ebp + 0x1038]
push eax
jmp 0x485271
cmp word [esi], 0
je 0x485279
push esi
mov ecx, dword [ebp - 0x50]
call fcn.004b0450
test bx, bx
je 0x48529e
lea esi, [edi + 2]
movzx eax, word [esi]
mov ecx, eax
cmp eax, 0xd
je 0x485290
cmp eax, 0xa
jne 0x485295
add esi, 2
jmp 0x485281
test ax, ax
jne 0x485170
mov byte [ebp - 4], 1
push dword [ebp - 0x14]
call fcn.00525b95
add esp, 4
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4852c1
push eax
call fcn.00525b95
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp]
call fcn.004815d0
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x3038]
xor ecx, ebp
call fcn.0051dca8
lea esp, [ebp + 0x303c]
pop ebp
ret 0x20