Function at 0x420d90
Capabilities:
Check if file exists
Get file attributes
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x430b12
mov eax, dword fs:[0]
push eax
sub esp, 0x874
mov eax, dword [0x43c0d8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 0xc]
mov eax, edi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x84c], esi
cmp dword [edi + 0x14], 8
jb 0x420dd3
mov eax, dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x420ead
test al, 0x10
jne 0x420ead
xorps xmm0, xmm0
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
cmp dword [edi + 0x14], 8
mov ecx, edi
mov dword [ebp - 4], 0
mov dword [ebp - 0x82c], edi
jb 0x420e1c
mov ecx, dword [edi]
mov dword [ebp - 0x82c], ecx
mov eax, dword [edi + 0x10]
mov dword [ebp - 0x848], eax
cmp eax, 0x7ffffffe
ja 0x42111d
mov dword [esi + 0x14], 7
cmp eax, 8
jae 0x420e4a
mov dword [esi + 0x10], eax
movups xmm0, xmmword [ecx]
movups xmmword [esi], xmm0
jmp 0x421100
mov edx, dword [esi + 0x14]
mov edi, eax
or edi, 7
cmp edi, 0x7ffffffe
jbe 0x420e61
mov edi, 0x7ffffffe
jmp 0x420e78
mov ecx, edx
mov eax, 0x7ffffffe
shr ecx, 1
sub eax, ecx
cmp edx, eax
ja 0x420e5a
lea eax, [ecx + edx]
cmp edi, eax
cmovb edi, eax
lea eax, [edi + 1]
mov ecx, esi
push eax
call fcn.0040c8c0
mov ecx, dword [ebp - 0x848]
mov dword [esi + 0x10], ecx
mov dword [esi], eax
mov dword [esi + 0x14], edi
lea ecx, [ecx*2 + 2]
push ecx
push dword [ebp - 0x82c]
push eax
call fcn.00423cb0
add esp, 0xc
jmp 0x421100
push 0x800
lea eax, [ebp - 0x810]
push 0
push eax
call fcn.00424230
xorps xmm0, xmm0
mov dword [ebp - 0x834], 0
add esp, 0xc
mov dword [ebp - 0x830], 0
movups xmmword [ebp - 0x844], xmm0
push 0xc
push str._SystemRoot_
lea ecx, [ebp - 0x844]
mov dword [ebp - 4], 1
call fcn.00401b00
cmp dword [ebp - 0x830], 8
lea ecx, [ebp - 0x810]
push 0x400
lea eax, [ebp - 0x844]
cmovae eax, dword [ebp - 0x844]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea ecx, [ebp - 0x844]
call fcn.00405af0
xorps xmm0, xmm0
mov dword [ebp - 0x858], 0
movups xmmword [ebp - 0x868], xmm0
mov dword [ebp - 0x854], 0
push 0xa
push str.System32_
lea ecx, [ebp - 0x868]
mov dword [ebp - 4], 2
call fcn.00401b00
xorps xmm0, xmm0
mov dword [ebp - 4], 3
movups xmmword [ebp - 0x844], xmm0
mov dword [ebp - 0x834], 0
mov dword [ebp - 0x830], 0
lea ecx, [ebp - 0x810]
mov byte [ebp - 4], 4
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x420f95
sub ecx, edx
lea eax, [ebp - 0x810]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x844]
call fcn.00401b00
lea eax, [ebp - 0x868]
mov byte [ebp - 4], 5
push eax
lea eax, [ebp - 0x844]
push eax
push dword [ebp - 0x84c]
lea ecx, [ebp - 0x880]
call fcn.004209b0
cmp dword [edi + 0x14], 8
mov eax, edi
mov byte [ebp - 4], 6
jb 0x420fe8
mov eax, dword [edi]
push dword [edi + 0x10]
lea ecx, [ebp - 0x880]
push eax
call fcn.004216e0
mov dword [ebp - 0x818], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x828], xmm0
mov dword [ebp - 0x814], 0
xor ecx, ecx
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x828], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x818], xmm0
mov word [eax], cx
lea ecx, [ebp - 0x880]
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
call fcn.00405af0
lea ecx, [ebp - 0x844]
call fcn.00405af0
lea ecx, [ebp - 0x868]
call fcn.00405af0
cmp dword [ebp - 0x814], 8
lea eax, [ebp - 0x828]
cmovae eax, dword [ebp - 0x828]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4210ce
test al, 0x10
jne 0x4210ce
xorps xmm0, xmm0
xor eax, eax
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
movups xmm0, xmmword [ebp - 0x828]
mov dword [esi + 0x14], 0
mov word [ebp - 0x828], ax
movups xmmword [esi], xmm0
movq xmm0, qword [ebp - 0x818]
movq qword [esi + 0x10], xmm0
mov dword [ebp - 0x818], 0
mov dword [ebp - 0x814], 7
jmp 0x4210f5
xorps xmm0, xmm0
xor eax, eax
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], ax
lea ecx, [ebp - 0x828]
call fcn.00405af0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042264a
mov esp, ebp
pop ebp
ret
call fcn.0040c7d0
int3