Function at 0x40afc0
Capabilities:
Check if file exists
Copy file
Delete file
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x124
mov eax, dword [0x70af2c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov dword [eax], 0
push edi
mov dword [ebp - 0x124], eax
cmp dword [esi + 0x20], 0
jne 0x40affd
push 0x27
push str.The_component_has_not_been_initialized.
jmp 0x40b74f
test ebx, ebx
je 0x40b748
mov ecx, esi
call fcn.0040a5e0
mov edx, dword [0x6dbf54]
mov eax, dword [edx]
mov edi, dword [eax + 0x210]
sub edi, 1
js 0x40b055
nop
mov eax, dword [edx]
test edi, edi
js 0x40b76f
cmp edi, dword [eax + 0x210]
jge 0x40b76f
mov eax, dword [eax + 0x20c]
mov ecx, dword [eax + edi*4]
test ecx, ecx
je 0x40b050
mov eax, dword [ecx]
push 1
call dword [eax + 4]
mov edx, dword [0x6dbf54]
sub edi, 1
jns 0x40b020
mov ecx, dword [edx]
push 0xffffffffffffffff
add ecx, 0x208
push 0
call fcn.0052c3de
push ebx
lea ebx, [esi + 0x58]
mov ecx, ebx
call fcn.0040d520
push dword [ebx]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x40b11a
push str._does_not_exist.
lea eax, [ebp - 0x114]
push ebx
push eax
call fcn.0040d8b0
lea ebx, [esi + 0x11c]
add esp, 0xc
mov esi, dword [ebx]
or edi, 0xffffffff
sub esi, 0x10
mov ecx, dword [eax]
lea edx, [ecx - 0x10]
cmp edx, esi
je 0x40b0f6
cmp dword [esi + 0xc], 0
jl 0x40b0eb
mov eax, dword [edx]
cmp eax, dword [esi]
jne 0x40b0eb
push edx
call fcn.00408950
add esp, 4
mov dword [ebp - 0x118], eax
mov ecx, edi
lea edx, [esi + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40b0e4
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x118]
add eax, 0x10
mov dword [ebx], eax
jmp 0x40b0f6
push dword [ecx - 0xc]
push ecx
mov ecx, ebx
call fcn.004087a0
mov edx, dword [ebp - 0x114]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x40b75a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x40b75a
push 0
mov ecx, esi
call fcn.0040a640
mov ecx, esi
call fcn.0040a550
cmp dword [esi + 0x1cc], 0
mov dword [esi + 0xdc], 1
jle 0x40b16d
nop dword [eax]
mov eax, dword [esi + 0x1c4]
lea ecx, [esi + 0x1c0]
mov edi, dword [eax + 8]
call fcn.0052aa65
test edi, edi
je 0x40b161
mov eax, dword [edi]
mov ecx, edi
push 1
call dword [eax + 4]
cmp dword [esi + 0x1cc], 0
jg 0x40b140
lea ebx, [esi + 0x58]
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [esi + 0x5c]
mov dword [ebp - 0x11c], eax
mov eax, dword [eax]
cmp dword [eax - 0xc], 0
je 0x40b196
push eax
call edi
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0xec]
call fcn.0052a609
lea eax, [ebp - 0x10c]
push eax
push 0
push 0x6db0dc
push dword [esi + 0x64]
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x40b73f
lea eax, [ebp - 0x10c]
push eax
call edi
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 0xfffffffd
cmp eax, 0x105
jae 0x40b783
lea edi, [ebp - 0x10c]
mov byte [ebp + eax - 0x10c], 0
dec edi
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x40b1e8
mov eax, dword [0x6db0e0]
lea ecx, [ebp - 0x10c]
mov dword [edi], eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40b202
sub ecx, edx
lea eax, [ebp - 0x10c]
push ecx
push eax
lea ecx, [esi + 0x5c]
call fcn.004087a0
cmp dword [esi + 0x1a0], 0
je 0x40b25a
push 0x14
call fcn.0051d816
add esp, 4
test eax, eax
je 0x40b23b
mov ecx, eax
call fcn.0052a475
jmp 0x40b23d
xor eax, eax
push eax
lea ecx, [esi + 0x1c0]
mov dword [esi + 0x78], eax
call fcn.0052a80d
push dword [esi + 0x1a0]
mov ecx, dword [esi + 0x78]
call fcn.0052a4d6
mov eax, dword [ebx]
sub esp, 8
lea edi, [eax - 0x10]
mov dword [ebp - 0x118], eax
push dword [esi + 0x78]
push ecx
mov ecx, dword [edi]
mov dword [ebp - 0x114], esp
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [edi + 0xc], 0
mov ecx, eax
lea eax, [edi + 0xc]
jl 0x40b28d
cmp ecx, dword [edi]
jne 0x40b28d
lock inc dword [eax]
jmp 0x40b2c1
mov eax, dword [ecx]
lea ebx, [edi + 4]
push 1
push dword [ebx]
call dword [eax]
mov edi, eax
test edi, edi
je 0x40b774
mov eax, dword [ebx]
mov dword [edi + 4], eax
mov eax, dword [ebx]
inc eax
push eax
push dword [ebp - 0x118]
push eax
lea eax, [edi + 0x10]
push eax
call fcn.004088d0
add esp, 0x10
lea ebx, [esi + 0x58]
mov edx, dword [ebp - 0x114]
lea eax, [edi + 0x10]
mov ecx, esi
mov dword [edx], eax
call fcn.0040a7d0
mov dword [esi + 0x74], eax
test eax, eax
jne 0x40b2f1
mov ecx, ebx
call fcn.004085b0
mov ecx, dword [ebp - 0x11c]
call fcn.004085b0
jmp 0x40b75a
mov ecx, eax
call fcn.0041aeb0
mov ecx, dword [esi + 0x74]
mov dword [esi + 0xd8], eax
call fcn.00419160
mov ebx, eax
lea ecx, [esi + 0xbc]
mov dword [ebp - 0x110], ebx
call fcn.0052aebc
or edi, 0xffffffff
test ebx, ebx
je 0x40b425
mov edx, dword [ebx + 0xc]
mov ecx, edx
neg ecx
sbb ecx, ecx
mov dword [ebp - 0x118], ecx
test edx, edx
je 0x40b425
nop dword [eax + eax]
call fcn.00529f92
mov ecx, eax
test ecx, ecx
je 0x40b779
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x114], eax
call fcn.00529f92
mov ecx, eax
test ecx, ecx
je 0x40b779
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov ecx, ebx
mov dword [ebp - 0x11c], eax
lea eax, [ebp - 0x11c]
push eax
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x118]
push eax
call fcn.0052acf6
push dword [ebp - 0x114]
mov ebx, dword [ebp - 0x11c]
lea ecx, [esi + 0xbc]
call fcn.0052abc3
mov dword [ebp - 0x120], eax
test ebx, ebx
jne 0x40b3bb
xor ecx, ecx
jmp 0x40b3cf
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40b3c0
mov eax, dword [ebp - 0x120]
sub ecx, edx
push ecx
push ebx
mov ecx, eax
call fcn.004087a0
mov edx, dword [ebp - 0x11c]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40b3f5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x114]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40b412
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [ebp - 0x118], 0
mov ebx, dword [ebp - 0x110]
jne 0x40b340
mov eax, dword [0x6dbf54]
mov ecx, dword [esi + 0x74]
mov eax, dword [eax]
push dword [eax + 0x900]
call fcn.00419020
mov ecx, eax
call fcn.004218c0
mov dword [ebp - 0x110], eax
test eax, eax
je 0x40b4ad
mov ecx, eax
call fcn.00421fd0
test eax, eax
je 0x40b4ad
push 0
push ecx
mov ebx, esp
call fcn.00529f92
mov ecx, eax
test ecx, ecx
je 0x40b779
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov ecx, ebx
mov dword [ebx], eax
mov eax, str.Rights
test eax, 0xffff0000
jne 0x40b48d
movzx eax, ax
push eax
call fcn.00409070
jmp 0x40b499
push 6
push str.Rights
call fcn.004087a0
call fcn.00413a20
mov ecx, dword [ebp - 0x110]
add esp, 8
push eax
call fcn.00421c00
push 0
push ecx
mov ebx, esp
call fcn.00529f92
mov ecx, eax
test ecx, ecx
je 0x40b779
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov ecx, ebx
mov dword [ebx], eax
mov eax, str.Perms
test eax, 0xffff0000
jne 0x40b4e4
movzx eax, ax
push eax
call fcn.00409070
jmp 0x40b4f0
push 5
push str.Perms
call fcn.004087a0
call fcn.00413a20
mov ecx, dword [esi + 0x74]
add esp, 8
push eax
call fcn.00419020
mov ecx, eax
call fcn.00421c00
mov ecx, dword [esi + 0x74]
mov eax, dword [ecx + 0x3c]
mov dword [esi + 0x90], eax
test eax, eax
je 0x40b651
mov eax, dword [ecx + 0x84]
mov dword [ebp - 0x110], eax
test eax, eax
je 0x40b569
push 0x14
call fcn.0051d816
add esp, 4
test eax, eax
je 0x40b543
mov ecx, eax
call fcn.0052a475
jmp 0x40b545
xor eax, eax
lea ebx, [esi + 0x1c0]
mov dword [esi + 0x7c], eax
push eax
mov ecx, ebx
call fcn.0052a80d
push dword [ebp - 0x110]
mov ecx, dword [esi + 0x7c]
call fcn.0052a4d6
mov ecx, dword [esi + 0x74]
jmp 0x40b576
mov dword [esi + 0x7c], 0
lea ebx, [esi + 0x1c0]
mov eax, dword [ecx + 0x7c]
mov dword [esi + 0x94], eax
mov eax, dword [ecx + 0x80]
mov dword [esi + 0x98], eax
mov eax, dword [ecx + 0x88]
mov dword [ebp - 0x110], eax
test eax, eax
je 0x40b5d8
push 0x14
call fcn.0051d816
add esp, 4
test eax, eax
je 0x40b5b2
mov ecx, eax
call fcn.0052a475
jmp 0x40b5b4
xor eax, eax
push eax
mov ecx, ebx
mov dword [esi + 0x80], eax
call fcn.0052a80d
push dword [ebp - 0x110]
mov ecx, dword [esi + 0x80]
call fcn.0052a4d6
mov ecx, dword [esi + 0x74]
jmp 0x40b5e2
mov dword [esi + 0x80], 0
mov eax, dword [ecx + 0x8c]
mov dword [ebp - 0x110], eax
test eax, eax
je 0x40b62f
push 0x14
call fcn.0051d816
add esp, 4
test eax, eax
je 0x40b609
mov ecx, eax
call fcn.0052a475
jmp 0x40b60b
xor eax, eax
push eax
mov ecx, ebx
mov dword [esi + 0x84], eax
call fcn.0052a80d
push dword [ebp - 0x110]
mov ecx, dword [esi + 0x84]
call fcn.0052a4d6
mov ecx, dword [esi + 0x74]
jmp 0x40b639
mov dword [esi + 0x84], 0
mov eax, dword [ecx + 0x90]
mov dword [esi + 0x9c], eax
mov eax, dword [ecx + 0x94]
mov dword [esi + 0xa0], eax
call fcn.00418aa0
test eax, eax
je 0x40b66c
mov ecx, eax
call fcn.00423010
test eax, eax
jle 0x40b66c
mov eax, 1
jmp 0x40b66e
xor eax, eax
cmp dword [esi + 0x100], 0
mov dword [esi + 0xa8], eax
je 0x40b6b6
cmp dword [esi + 0x74], 0
je 0x40b6b6
mov eax, dword [esi + 0x10c]
cmp eax, dword [0x6a77a8]
je 0x40b6a0
mov eax, dword [esi + 0x108]
lea ecx, [esi + 0x108]
call dword [eax + 0x50]
mov eax, dword [esi + 0x108]
lea ecx, [esi + 0x108]
push 0
push 0x30
push dword [esi + 0x58]
call dword [eax + 0x24]
mov ebx, dword [esi + 0x70]
mov dword [esi + 0x4c], 0
mov ecx, dword [ebx - 0xc]
test ecx, ecx
jle 0x40b723
mov eax, dword [esi + 0x58]
cmp dword [eax - 0xc], ecx
jle 0x40b723
push ecx
lea eax, [ebp - 0x110]
push eax
lea ecx, [esi + 0x58]
call fcn.0040cf90
push ebx
push dword [eax]
call fcn.0065ec65
mov edx, dword [ebp - 0x110]
add esp, 8
test eax, eax
sete bl
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x40b70a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test bl, bl
je 0x40b723
mov dword [esi + 0x30], 0
mov dword [esi + 0x34], 1
mov dword [esi + 0x4c], 1
push 0
push dword [esi + 0x5c]
push dword [esi + 0x58]
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov eax, dword [ebp - 0x124]
mov dword [eax], 1
jmp 0x40b75a
push 0x18
push str.Create_temp_file_failed.
jmp 0x40b74f
push 0x1c
push str.The_original_reader_is_NULL.
lea ecx, [esi + 0x11c]
call fcn.004087a0
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.006588a1
mov esp, ebp
pop ebp
ret 0x10
call fcn.00521bcd
call fcn.004088c0
push 0x80004005
call fcn.004088a0
call fcn.006589f6
int3