Function at 0x402210
Capabilities:
Get common file path
Get program files directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x561a1b
mov eax, dword fs:[0]
push eax
sub esp, 0x21c
mov eax, dword [0x5c1fe4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
call fcn.00408d1f
mov ecx, eax
test ecx, ecx
je 0x4024ab
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x21c], eax
mov dword [ebp - 4], 0
call fcn.00408d1f
mov ecx, eax
test ecx, ecx
je 0x4024b5
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x220], eax
mov byte [ebp - 4], 1
call fcn.004020d0
mov edx, eax
test edx, edx
jne 0x402292
xor ecx, ecx
jmp 0x4022a6
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402297
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x21c]
call fcn.00406c20
mov edi, dword [ebp - 0x21c]
mov esi, dword [edi - 0xc]
test esi, esi
js 0x4024a1
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, esi
or eax, ecx
jge 0x4022e7
push esi
lea ecx, [ebp - 0x21c]
call fcn.00406a40
mov edi, dword [ebp - 0x21c]
lea eax, [esi + 1]
push eax
push edi
call fcn.0054974e
add esp, 8
cmp esi, dword [edi - 8]
jg 0x4024a1
xor eax, eax
mov dword [edi - 0xc], esi
mov word [edi + esi*2], ax
mov eax, dword [0x5ca9c8]
cmp dword [eax - 0xc], 0
jne 0x402356
lea eax, [ebp - 0x218]
push eax
push 0
push 0
push 0x26
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402330
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
mov ecx, 0x5ca9c8
call fcn.00406c20
mov eax, dword [0x5ca9c8]
test eax, eax
jne 0x40235e
xor edx, edx
jmp 0x402372
mov edx, eax
lea esi, [edx + 2]
mov cx, word [edx]
add edx, 2
test cx, cx
jne 0x402363
sub edx, esi
sar edx, 1
push edx
push eax
lea ecx, [ebp - 0x220]
call fcn.00406c20
mov esi, dword [ebp - 0x220]
mov ebx, dword [esi - 0xc]
test ebx, ebx
js 0x4024a1
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, ebx
or eax, ecx
jge 0x4023b3
push ebx
lea ecx, [ebp - 0x220]
call fcn.00406a40
mov esi, dword [ebp - 0x220]
lea eax, [ebx + 1]
push eax
push esi
call fcn.0054974e
add esp, 8
cmp ebx, dword [esi - 8]
jg 0x4024a1
xor eax, eax
mov dword [esi - 0xc], ebx
mov word [esi + ebx*2], ax
lea ecx, [ebp - 0x21c]
push dword [esi - 0xc]
lea eax, [ebp - 0x224]
push eax
call fcn.00405400
mov ecx, esi
mov eax, dword [eax]
nop dword [eax + eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x402416
test dx, dx
je 0x402412
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x402416
add eax, 4
add ecx, 4
test dx, dx
jne 0x4023f0
xor eax, eax
jmp 0x40241b
sbb eax, eax
or eax, 1
mov edx, dword [ebp - 0x224]
xor ecx, ecx
test eax, eax
sete cl
or ebx, 0xffffffff
mov dword [ebp - 0x228], ecx
add edx, 0xfffffff0
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x402448
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x402463
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
add edi, 0xfffffff0
lock xadd dword [edi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x40247f
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x228]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00541cbd
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.00406d80
push 0x80004005
call fcn.00406d80
push 0x80004005
call fcn.00406d80
int3