Function at 0x402c6b
Capabilities:
Check if file exists
Copy file
Create thread
Delete file
Get file attributes
Read .ini file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xdec
and byte [ebp - 0x954], 0
push ebx
push esi
mov edx, 0x100
push edi
mov ecx, edx
xor eax, eax
lea edi, [ebp - 0x953]
and byte [ebp - 0xdec], al
and byte [ebp - 0x550], al
rep stosd dword es:[edi], eax
mov ecx, edx
lea edi, [ebp - 0xdeb]
rep stosd dword es:[edi], eax
mov ecx, edx
lea edi, [ebp - 0x54f]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x9e8]
mov dword [ebp - 0x9e8], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ebx, dword [ebp + 8]
cmp byte [ebx], 0
je 0x4034de
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0xdec]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebp - 0xdec]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00402415
pop ecx
mov edi, str.Res_version.ini
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp - 0xdec]
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [ebp - 0xdec]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x403482
cmp dword [ebp - 0x9d8], 2
jne 0x4030df
lea eax, [ebp - 8]
xor esi, esi
push eax
push esi
push ebx
push 0x4042b1
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp dword [0x407a2c], esi
jne 0x402d7e
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x402d6c
lea eax, [ebp - 0x954]
push eax
push 0x401
call fcn.0040407e
lea eax, [ebp - 0x954]
push eax
call fcn.00402415
mov edi, str.SePResSecSePHLd.dll
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x954]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [ebp - 0x550]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebp - 0x550]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00402415
mov edi, str.ResSecSePHLd.dll
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x550]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x954]
mov ecx, ebx
push eax
and ecx, 3
lea eax, [ebp - 0x550]
rep movsb byte es:[edi], byte [esi]
push eax
call fcn.00404c0e
add esp, 0x18
mov ebx, 0x80
test eax, eax
je 0x402ebe
lea eax, [ebp - 0x550]
push 0
push eax
lea eax, [ebp - 0x954]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [ebp - 0x550]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov edi, str..bak
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x550]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [ebp - 0x550]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [ebp - 0x550]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
and byte [ebp - 0x954], 0
and byte [ebp - 0x550], 0
lea eax, [ebp - 0x954]
push eax
push 0x401
call fcn.0040407e
lea eax, [ebp - 0x954]
push eax
call fcn.00402415
mov edi, str.SePResSecCacheSePHLd.dll
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x954]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [ebp - 0x550]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp + 8]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebp - 0x550]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00402415
mov edi, str.ResSecCacheSePHLd.dll
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x550]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x954]
mov ecx, edx
push eax
and ecx, 3
lea eax, [ebp - 0x550]
rep movsb byte es:[edi], byte [esi]
push eax
call fcn.00404c0e
add esp, 0x18
test eax, eax
je 0x403008
lea eax, [ebp - 0x550]
push 0
push eax
lea eax, [ebp - 0x954]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [ebp - 0x550]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov edi, str..bak
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x550]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [ebp - 0x550]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [ebp - 0x550]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov edx, dword [ebp + 8]
lea eax, [edx + 0x5a4]
test eax, eax
mov dword [ebp + 8], eax
je 0x4030d0
test edx, edx
je 0x4030d0
cmp byte [eax], 0
je 0x4030d0
cmp byte [edx], 0
je 0x4030d0
and byte [ebp - 0x14c], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x14b]
lea esi, [ebp - 0x14c]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
mov edx, esi
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebp - 0x14c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00402415
pop ecx
mov edi, str.Res_version.ini
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp - 0x14c]
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push eax
lea eax, [ebp - 0x14c]
mov ecx, edx
push eax
push dword [ebp + 8]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CopyFileA]
push ebx
lea eax, [ebp - 0x14c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov dword [0x407a30], 1
jmp 0x4034de
lea edi, [ebx + 0x30c]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x954]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebp - 0x954]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00402415
mov ebx, str.ResSecSePHLd.dll
or ecx, 0xffffffff
mov edi, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp - 0x954]
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [ebp - 0x550]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp + 8]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebp - 0x550]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00402415
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x550]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x954]
mov ecx, ebx
push eax
and ecx, 3
lea eax, [ebp - 0x550]
rep movsb byte es:[edi], byte [esi]
push eax
call fcn.00404c0e
add esp, 0x10
mov ebx, 0x80
test eax, eax
je 0x403247
mov esi, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [ebp - 0x550]
push ebx
push eax
call esi
lea eax, [ebp - 0x550]
push 0
push eax
lea eax, [ebp - 0x954]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [ebp - 0x550]
push ebx
push eax
call esi
mov edi, str..bak
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x550]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [ebp - 0x550]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [ebp - 0x550]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [ebp + 8]
and byte [ebp - 0x954], 0
and byte [ebp - 0x550], 0
or ecx, 0xffffffff
lea edi, [eax + 0x30c]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp - 0x954]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebp - 0x954]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00402415
mov edi, str.ResSecCacheSePHLd.dll
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x954]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [ebp - 0x550]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp + 8]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebp - 0x550]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00402415
mov edi, str.ResSecCacheSePHLd.dll
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x550]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x954]
mov ecx, edx
push eax
and ecx, 3
lea eax, [ebp - 0x550]
rep movsb byte es:[edi], byte [esi]
push eax
call fcn.00404c0e
add esp, 0x10
test eax, eax
je 0x4033bc
mov esi, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [ebp - 0x550]
push ebx
push eax
call esi
lea eax, [ebp - 0x550]
push 0
push eax
lea eax, [ebp - 0x954]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [ebp - 0x550]
push ebx
push eax
call esi
mov edi, str..bak
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x550]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [ebp - 0x550]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [ebp - 0x550]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov edx, dword [ebp + 8]
lea eax, [edx + 0x5a4]
test eax, eax
mov dword [ebp + 8], eax
je 0x4030d0
test edx, edx
je 0x4030d0
cmp byte [eax], 0
je 0x4030d0
cmp byte [edx], 0
je 0x4030d0
and byte [ebp - 0x14c], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x14b]
lea esi, [ebp - 0x14c]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
mov edx, esi
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebp - 0x14c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00402415
pop ecx
mov edi, str.Res_version.ini
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp - 0x14c]
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push eax
lea eax, [ebp - 0x14c]
mov ecx, edx
push eax
push dword [ebp + 8]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CopyFileA]
push ebx
lea eax, [ebp - 0x14c]
jmp 0x4030c9
and byte [ebp - 0x48], 0
push 0xf
pop ecx
xor eax, eax
lea edi, [ebp - 0x47]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0xdec]
push eax
lea eax, [ebp - 0x48]
push 0x40
push eax
push 0x407a44
push str.CAPSULE
push str.VERSION
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
je 0x4034de
cmp byte [ebp - 0x48], 0
je 0x4034de
push 1
lea eax, [ebp - 0x48]
pop esi
push esi
push eax
push str.1._3._18._7
call fcn.00403536
add esp, 0xc
cmp eax, esi
jne 0x4034de
mov dword [0x407a30], esi
pop edi
pop esi
pop ebx
leave
ret