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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x471b7a
mov eax, dword fs:[0]
push eax
sub esp, 0x4f4
mov eax, dword [0x493120]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ecx, dword [ebp + 8]
push 0x104
lea eax, [ebp - 0x21c]
push eax
xor esi, esi
mov dword [ebp - 4], esi
push ecx
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
xor edx, edx
lea eax, [ebp - 0x21c]
mov word [ebp - 0x434], dx
mov dword [ebp - 0x420], 7
mov dword [ebp - 0x424], esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x421352
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x438]
call fcn.00407260
mov edx, dword [ebp - 0x420]
mov ecx, dword [ebp - 0x434]
mov byte [ebp - 4], 2
mov eax, ecx
cmp edx, 8
jae 0x421391
lea eax, [ebp - 0x434]
mov edi, dword [ebp - 0x424]
lea ebx, [eax + edi*2]
cmp ebx, esi
je 0x4213c3
mov eax, ecx
cmp edx, 8
jae 0x4213ab
lea eax, [ebp - 0x434]
cmp eax, ebx
ja 0x4213c3
mov eax, ecx
cmp edx, 8
jae 0x4213bc
lea eax, [ebp - 0x434]
lea eax, [eax + edi*2]
cmp ebx, eax
jbe 0x4213da
call fcn.0044fe08
mov edx, dword [ebp - 0x420]
mov edi, dword [ebp - 0x424]
mov ecx, dword [ebp - 0x434]
cmp edx, 8
jb 0x421513
mov esi, ecx
test ecx, ecx
je 0x42140e
mov eax, ecx
cmp edx, 8
jae 0x4213f6
lea eax, [ebp - 0x434]
cmp eax, esi
ja 0x42140e
mov eax, ecx
cmp edx, 8
jae 0x421407
lea eax, [ebp - 0x434]
lea ecx, [eax + edi*2]
cmp esi, ecx
jbe 0x421413
call fcn.0044fe08
mov edx, dword [ebp - 0x458]
push edx
lea eax, [ebp - 0x438]
push ebx
mov ecx, eax
push ecx
push esi
mov edi, 0xf
push eax
lea ecx, [ebp - 0x454]
mov dword [ebp - 0x43c], edi
mov dword [ebp - 0x440], 0
mov byte [ebp - 0x450], 0
call fcn.0041e450
mov eax, dword [ebp - 0x450]
mov ebx, 0x10
cmp dword [ebp - 0x43c], ebx
jae 0x421466
lea eax, [ebp - 0x450]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x42151e
cmp dword [ebp - 0x43c], ebx
jb 0x42148d
mov eax, dword [ebp - 0x450]
push eax
call fcn.0042c1ba
add esp, 4
xor esi, esi
cmp dword [ebp - 0x420], 8
mov dword [ebp - 0x43c], edi
mov dword [ebp - 0x440], esi
mov byte [ebp - 0x450], 0
jb 0x4214ba
mov ecx, dword [ebp - 0x434]
push ecx
call fcn.0042c1ba
add esp, 4
xor edx, edx
mov dword [ebp - 0x420], 7
mov dword [ebp - 0x424], esi
mov word [ebp - 0x434], dx
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov dword [ebp - 4], edx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4214f5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0044fc9c
mov esp, ebp
pop ebp
ret
lea esi, [ebp - 0x434]
jmp 0x4213e9
test bl, al
je 0x4215b0
cmp dword [ebp - 0x43c], ebx
jb 0x42153d
mov ecx, dword [ebp - 0x450]
push ecx
call fcn.0042c1ba
add esp, 4
xor esi, esi
cmp dword [ebp - 0x420], 8
mov dword [ebp - 0x43c], edi
mov dword [ebp - 0x440], esi
mov byte [ebp - 0x450], 0
jb 0x42156a
mov edx, dword [ebp - 0x434]
push edx
call fcn.0042c1ba
add esp, 4
xor eax, eax
mov word [ebp - 0x434], ax
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
mov dword [ebp - 0x420], 7
mov dword [ebp - 0x424], esi
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4215a9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, 1
jmp 0x4214f7
cmp dword [ebp - 0x43c], ebx
jb 0x4215c7
mov ecx, dword [ebp - 0x450]
push ecx
call fcn.0042c1ba
add esp, 4
cmp dword [ebp - 0x420], 8
mov dword [ebp - 0x43c], edi
mov dword [ebp - 0x440], 0
mov byte [ebp - 0x450], 0
jb 0x4214d3
mov edx, dword [ebp - 0x434]
push edx
call fcn.0042c1ba
add esp, 4
jmp 0x4214d3