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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46e4aa
mov eax, dword fs:[0]
push eax
sub esp, 0x4f4
mov eax, dword [0x490120]
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
push 0xe
xor esi, esi
push 0x474b0c
mov ecx, 0x491804
mov dword [ebp - 4], esi
call fcn.004031a0
mov ecx, dword [ebp + 8]
push 0x104
lea eax, [ebp - 0x21c]
push eax
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 0x41f533
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x438]
call fcn.00407150
mov edx, dword [ebp - 0x420]
mov ecx, dword [ebp - 0x434]
mov byte [ebp - 4], 2
mov eax, ecx
cmp edx, 8
jae 0x41f572
lea eax, [ebp - 0x434]
mov edi, dword [ebp - 0x424]
lea ebx, [eax + edi*2]
cmp ebx, esi
je 0x41f5a4
mov eax, ecx
cmp edx, 8
jae 0x41f58c
lea eax, [ebp - 0x434]
cmp eax, ebx
ja 0x41f5a4
mov eax, ecx
cmp edx, 8
jae 0x41f59d
lea eax, [ebp - 0x434]
lea eax, [eax + edi*2]
cmp ebx, eax
jbe 0x41f5bb
call fcn.0044de68
mov edx, dword [ebp - 0x420]
mov edi, dword [ebp - 0x424]
mov ecx, dword [ebp - 0x434]
cmp edx, 8
jb 0x41f6f4
mov esi, ecx
test ecx, ecx
je 0x41f5ef
mov eax, ecx
cmp edx, 8
jae 0x41f5d7
lea eax, [ebp - 0x434]
cmp eax, esi
ja 0x41f5ef
mov eax, ecx
cmp edx, 8
jae 0x41f5e8
lea eax, [ebp - 0x434]
lea ecx, [eax + edi*2]
cmp esi, ecx
jbe 0x41f5f4
call fcn.0044de68
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.0041d590
mov eax, dword [ebp - 0x450]
mov ebx, 0x10
cmp dword [ebp - 0x43c], ebx
jae 0x41f647
lea eax, [ebp - 0x450]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x41f6ff
cmp dword [ebp - 0x43c], ebx
jb 0x41f66e
mov eax, dword [ebp - 0x450]
push eax
call fcn.0042a20f
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 0x41f69b
mov ecx, dword [ebp - 0x434]
push ecx
call fcn.0042a20f
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 0x41f6d6
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.0044dcfc
mov esp, ebp
pop ebp
ret
lea esi, [ebp - 0x434]
jmp 0x41f5ca
test bl, al
je 0x41f791
cmp dword [ebp - 0x43c], ebx
jb 0x41f71e
mov ecx, dword [ebp - 0x450]
push ecx
call fcn.0042a20f
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 0x41f74b
mov edx, dword [ebp - 0x434]
push edx
call fcn.0042a20f
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 0x41f78a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, 1
jmp 0x41f6d8
cmp dword [ebp - 0x43c], ebx
jb 0x41f7a8
mov ecx, dword [ebp - 0x450]
push ecx
call fcn.0042a20f
add esp, 4
cmp dword [ebp - 0x420], 8
mov dword [ebp - 0x43c], edi
mov dword [ebp - 0x440], 0
mov byte [ebp - 0x450], 0
jb 0x41f6b4
mov edx, dword [ebp - 0x434]
push edx
call fcn.0042a20f
add esp, 4
jmp 0x41f6b4