Function at 0x475500
Capabilities:
Query environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x3028]
mov eax, 0x3028
call fcn.00502fa0
push 0xffffffffffffffff
push 0x51eeb8
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x5513d4]
xor eax, ebp
mov dword [ebp + 0x3024], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ecx, dword [ebp + 0x3034]
mov eax, dword [ebp + 0x3030]
mov dword [ebp - 0x4c], ecx
xor ecx, ecx
mov word [ebp + 0x2024], cx
test eax, eax
je 0x47558a
cmp byte [ebp + 0x3038], cl
je 0x475578
push ecx
push 1
push 0x800
lea ecx, [ebp + 0x2024]
push ecx
push eax
call fcn.00484580
jmp 0x47558a
push 0x800
push eax
lea eax, [ebp + 0x2024]
push eax
call fcn.0049ce90
lea ecx, [ebp]
call fcn.00472610
mov dword [ebp - 4], 0
cmp word [ebp + 0x2024], 0
je 0x4755f0
mov bl, byte [ebp + 0x303c]
lea eax, [ebp + 0x2024]
lea ecx, [ebp]
test bl, bl
je 0x4755be
push eax
call fcn.00473430
jmp 0x4755c6
push 0
push eax
call fcn.00472d30
test al, al
jne 0x4755f7
test bl, bl
je 0x4755da
push 6
mov ecx, 0x58c304
call fcn.0046daa0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp]
call fcn.00472650
xor al, al
jmp 0x4759e2
mov dword [ebp + 0xc], 1
xor esi, esi
mov byte [ebp - 0x14], 0
push 0x1000
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], esi
call fcn.00404d60
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x24]
push 0x1000
push ecx
lea ecx, [ebp]
call fcn.00473010
test eax, eax
je 0x47566a
nop
push eax
lea ecx, [ebp - 0x24]
add esi, eax
call fcn.00404d60
mov eax, dword [ebp - 0x24]
lea ecx, [ebp]
add eax, esi
push 0x1000
push eax
call fcn.00473010
test eax, eax
jne 0x475630
cmp esi, dword [ebp - 0x1c]
jbe 0x47566a
mov eax, esi
lea ecx, [ebp - 0x24]
sub eax, dword [ebp - 0x20]
push eax
call fcn.00404d60
mov edi, dword [ebp - 0x20]
jmp 0x47566f
mov edi, esi
mov dword [ebp - 0x20], edi
mov ecx, dword [ebp - 0x24]
cmp esi, 2
jb 0x47568b
cmp byte [ecx], 0xff
jne 0x47568b
cmp byte [ecx + 1], 0xfe
jne 0x47568b
mov dword [ebp - 0x28], 1
jmp 0x475690
xor eax, eax
mov dword [ebp - 0x28], eax
cmp esi, 2
jb 0x4756a7
cmp byte [ecx], 0xfe
jne 0x4756a7
cmp byte [ecx + 1], 0xff
mov dword [ebp - 0x40], 1
je 0x4756ae
mov dword [ebp - 0x40], 0
cmp esi, 3
jb 0x4756c8
cmp byte [ecx], 0xef
jne 0x4756c8
cmp byte [ecx + 1], 0xbb
jne 0x4756c8
cmp byte [ecx + 2], 0xbf
mov byte [ebp - 0xd], 1
je 0x4756cc
mov byte [ebp - 0xd], 0
mov ebx, dword [ebp + 0x3040]
test ebx, ebx
jne 0x4756df
push esi
push ecx
call fcn.00475450
mov ebx, eax
mov dword [ebp - 0x3c], 0
xor ecx, ecx
xor esi, esi
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x30], ecx
mov byte [ebp - 0x2c], cl
mov byte [ebp - 4], 2
test ebx, ebx
je 0x475708
cmp ebx, 2
je 0x475708
cmp ebx, 1
jne 0x475750
push 1
lea ecx, [ebp - 0x24]
call fcn.00404d60
mov edi, dword [ebp - 0x20]
mov eax, dword [ebp - 0x24]
mov byte [edi + eax - 1], 0
cmp ebx, 2
jne 0x47572a
push eax
push eax
call dword [sym.imp.USER32.dll_OemToCharA]
test edi, edi
je 0x47573c
push edi
lea ecx, [ebp - 0x3c]
call fcn.00410ca0
mov esi, dword [ebp - 0x38]
jmp 0x475741
mov esi, edi
mov dword [ebp - 0x38], esi
push esi
push dword [ebp - 0x3c]
push dword [ebp - 0x24]
call fcn.0049ff80
mov ecx, dword [ebp - 0x34]
cmp ebx, 3
jne 0x475804
mov ebx, dword [ebp - 0x28]
mov dword [ebp - 0x44], 2
test ebx, ebx
jne 0x475774
cmp dword [ebp - 0x40], ebx
jne 0x475774
xor eax, eax
mov dword [ebp - 0x44], eax
lea ebx, [eax + 1]
mov eax, edi
shr eax, 1
inc eax
cmp eax, ecx
jbe 0x47578a
sub eax, esi
lea ecx, [ebp - 0x3c]
push eax
call fcn.00410ca0
jmp 0x47578d
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x44]
and edi, 0xfffffffe
mov dword [ebp - 0x48], edi
cmp eax, edi
jae 0x4757f5
mov esi, dword [ebp - 0x24]
mov edx, edi
sub ebx, dword [ebp - 0x40]
sub edx, eax
dec edx
mov dword [ebp - 0x28], ebx
add esi, eax
shr edx, 1
add esi, dword [ebp - 0x40]
inc edx
mov eax, 0x100
xor edi, edi
jmp 0x4757c0
movzx ecx, byte [ebx + esi]
lea esi, [esi + 2]
mov ebx, dword [ebp - 0x3c]
movzx eax, ax
imul ecx, eax
movzx eax, byte [esi - 2]
add cx, ax
mov eax, edi
shr eax, 1
add edi, 2
mov word [ebx + eax*2], cx
mov eax, 0x100
mov ebx, dword [ebp - 0x28]
sub edx, 1
jne 0x4757c0
mov edi, dword [ebp - 0x48]
mov eax, dword [ebp - 0x44]
mov esi, dword [ebp - 0x3c]
sub edi, eax
shr edi, 1
xor eax, eax
mov word [esi + edi*2], ax
jmp 0x475853
cmp ebx, 4
jne 0x475850
push 1
lea ecx, [ebp - 0x24]
call fcn.00404d60
mov eax, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x24]
mov byte [eax + ebx - 1], 0
cmp eax, dword [ebp - 0x34]
jbe 0x475833
sub eax, esi
lea ecx, [ebp - 0x3c]
push eax
call fcn.00410ca0
mov eax, dword [ebp - 0x38]
jmp 0x475836
mov dword [ebp - 0x38], eax
mov esi, dword [ebp - 0x3c]
push eax
movzx eax, byte [ebp - 0xd]
neg eax
push esi
sbb eax, eax
and eax, 3
add eax, ebx
push eax
call fcn.004a00a0
jmp 0x475856
mov esi, dword [ebp - 0x3c]
mov ebx, dword [ebp - 0x24]
cmp word [esi], 0
mov edi, esi
je 0x475992
mov bh, byte [ebp + 0x3044]
mov bl, byte [ebp + 0x304c]
mov edi, edi
xor ecx, ecx
mov esi, edi
cmp word [edi], 0xd
je 0x4758ac
mov dl, byte [ebp + 0x3048]
movzx eax, word [esi]
cmp eax, 0xa
je 0x4758ac
test ax, ax
je 0x4758ac
test dl, dl
je 0x4758a3
cmp eax, 0x2f
jne 0x4758a3
cmp word [esi + 2], ax
jne 0x4758a3
xor eax, eax
mov ecx, esi
mov word [esi], ax
add esi, 2
cmp word [esi], 0xd
jne 0x475880
movzx eax, word [esi]
mov dword [ebp - 0x48], eax
xor eax, eax
mov word [esi], ax
test ecx, ecx
jne 0x4758bd
mov ecx, esi
lea eax, [ecx - 2]
cmp eax, edi
jb 0x4758dd
movzx ecx, word [eax]
cmp ecx, 0x20
je 0x4758d1
cmp ecx, 9
jne 0x4758dd
xor ecx, ecx
mov word [eax], cx
sub eax, 2
cmp eax, edi
jae 0x4758c4
test bh, bh
je 0x475911
cmp word [edi], 0x22
jne 0x475911
mov ecx, edi
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4758f0
sub ecx, edx
sar ecx, 1
cmp word [edi + ecx*2 - 2], 0x22
jne 0x475911
xor eax, eax
mov word [edi + ecx*2 - 2], ax
add edi, 2
test bl, bl
je 0x475955
cmp word [edi], 0x25
jne 0x475955
xor eax, eax
mov word [ebp + 0x1024], ax
lea eax, [ebp + 0x1024]
push 0x800
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x475955
cmp eax, 0x800
jae 0x475955
cmp word [ebp + 0x1024], 0
je 0x475964
lea eax, [ebp + 0x1024]
push eax
jmp 0x47595c
cmp word [edi], 0
je 0x475964
push edi
mov ecx, dword [ebp - 0x4c]
call fcn.0049cf80
cmp word [ebp - 0x48], 0
je 0x47598c
lea edi, [esi + 2]
mov edi, edi
movzx eax, word [edi]
cmp eax, 0xd
je 0x47597d
cmp eax, 0xa
jne 0x475982
add edi, 2
jmp 0x475970
cmp word [edi], 0
jne 0x475870
mov ebx, dword [ebp - 0x24]
mov esi, dword [ebp - 0x3c]
mov byte [ebp - 4], 1
cmp byte [ebp - 0x2c], 0
je 0x4759a8
mov eax, dword [ebp - 0x34]
add eax, eax
push eax
push esi
call fcn.0049a3e0
push esi
call fcn.005097b2
add esp, 4
mov byte [ebp - 4], 0
test ebx, ebx
je 0x4759d1
cmp byte [ebp - 0x14], 0
je 0x4759c8
push dword [ebp - 0x1c]
push ebx
call fcn.0049a3e0
push ebx
call fcn.005097b2
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp]
call fcn.00472650
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 + 0x3024]
xor ecx, ebp
call fcn.00502f8e
lea esp, [ebp + 0x3028]
pop ebp
ret 0x20