Function at 0x40c090
Capabilities:
Check if file exists
Delete file
Get file size
Query or enumerate registry value
Read file on windows
Set registry value
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42bba7
mov eax, dword fs:[0]
push eax
sub esp, 0xcc
mov eax, dword [0x4360e4]
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
mov edi, ecx
mov dword [ebp - 0xd8], edi
mov ebx, dword [ebp + 8]
mov dword [ebp - 0xac], ebx
mov dword [ebp - 0xa4], 0
call fcn.00402b4c
mov ecx, eax
test ecx, ecx
je 0x40c790
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0xd0], esi
mov dword [ebp - 4], 0
call fcn.00402b4c
mov ecx, eax
test ecx, ecx
je 0x40c79a
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0xa8], eax
cmp dword [edi], 0
mov byte [ebp - 4], 1
mov dword [ebp - 0xd4], 0
je 0x40c137
mov ebx, 1
jmp 0x40c730
push 1
lea eax, [ebp - 0x98]
push ebx
push eax
call fcn.0040bdd0
add esp, 0xc
push eax
lea ecx, [ebp - 0xd0]
mov byte [ebp - 4], 2
call fcn.00402838
mov edx, dword [ebp - 0x98]
or eax, 0xffffffff
mov byte [ebp - 4], 1
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40c17b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0xd0]
push esi
call fcn.0040b940
mov eax, ebx
add esp, 4
sub eax, 2
je 0x40c208
sub eax, 1
je 0x40c19d
xor edi, edi
jmp 0x40c280
push str.CNPPage
lea ecx, [ebp - 0xcc]
call fcn.0040322e
lea eax, [ebp - 0xb4]
mov dword [ebp - 0xcc], 0x42cafc
push eax
lea eax, [ebp - 0x98]
mov dword [ebp - 0x98], 0
push eax
lea eax, [ebp - 0x9c]
mov dword [ebp - 0xb4], 4
push eax
push 0
push str.dver
push dword [ebp - 0xc8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40c273
cmp dword [ebp - 0x9c], 4
jne 0x40c273
mov edi, dword [ebp - 0x98]
jmp 0x40c275
push 0x42cae0
lea ecx, [ebp - 0xcc]
call fcn.0040322e
lea eax, [ebp - 0x9c]
mov dword [ebp - 0xcc], 0x42cadc
push eax
lea eax, [ebp - 0x98]
mov dword [ebp - 0x98], 0
push eax
lea eax, [ebp - 0xb4]
mov dword [ebp - 0x9c], 4
push eax
push 0
push str.dver
push dword [ebp - 0xc8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40c273
cmp dword [ebp - 0xb4], 4
jne 0x40c273
mov edi, dword [ebp - 0x98]
jmp 0x40c275
xor edi, edi
lea ecx, [ebp - 0xcc]
call fcn.004020dc
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
neg eax
lea ecx, [ebp - 0xd4]
push ecx
sbb eax, eax
lea ecx, [ebp - 0xa8]
push ecx
and eax, edi
push eax
push ebx
call fcn.00404c18
mov ecx, eax
call fcn.00404872
test eax, eax
jne 0x40c2c4
call fcn.0040c7b0
test eax, eax
je 0x40c72e
push str.Get_durl_fail
jmp 0x40c726
mov eax, dword [ebp - 0xa8]
cmp dword [eax - 0xc], 0
jne 0x40c2fe
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40c2f2
call fcn.0040c7b0
test eax, eax
je 0x40c72e
push str.not_dll
jmp 0x40c726
mov eax, dword [ebp - 0xa8]
cmp dword [eax - 0xc], 0
je 0x40c330
call fcn.00404c18
push 0
push dword [ebp - 0xa8]
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 4]
test eax, eax
jne 0x40c504
call fcn.0040c7b0
test eax, eax
je 0x40c330
push str.DownLoadBuffer_fail
call fcn.0040c870
add esp, 4
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40c70c
push 0
push 0
push 0x80
push 3
push 0
push 0x80000000
push esi
lea ecx, [ebp - 0xa0]
mov dword [ebp - 0xa0], 0
mov dword [ebp - 0x9c], 0
call fcn.00405f1c
test eax, eax
js 0x40c701
lea eax, [ebp - 0xac]
push eax
push dword [ebp - 0xa0]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
mov dword [ebp - 0xb0], edi
cmp edi, 0xffffffff
jne 0x40c3ac
call fcn.00405ec3
test eax, eax
js 0x40c701
mov edi, dword [ebp - 0xb0]
mov eax, edi
or eax, dword [ebp - 0xac]
je 0x40c701
lea eax, [edi + 1]
push eax
call fcn.00411cf8
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x40c701
lea eax, [edi + 1]
push eax
push 0
push ebx
call fcn.0040fff0
add esp, 0xc
mov dword [ebp - 0xac], 0
lea eax, [ebp - 0xac]
push 0
push eax
push edi
push ebx
push dword [ebp - 0xa0]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40c409
call fcn.00405ec3
mov eax, dword [ebp - 0xa0]
test eax, eax
je 0x40c41a
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0
push edi
push ebx
call fcn.0040d4c0
add esp, 0x10
mov dword [ebp - 0x98], eax
test eax, eax
je 0x40c49a
inc eax
push eax
mov dword [ebp - 0x9c], eax
call fcn.00411cf8
add esp, 4
mov dword [ebp - 0xa4], eax
test eax, eax
je 0x40c49a
push dword [ebp - 0x9c]
push 0
push eax
call fcn.0040fff0
push dword [ebp - 0x98]
push dword [ebp - 0xa4]
push edi
push ebx
call fcn.0040d4c0
add esp, 0x1c
cmp dword [ebp - 0x98], eax
je 0x40c49a
push dword [ebp - 0xa4]
call fcn.00411a15
add esp, 4
mov dword [ebp - 0xa4], 0
mov dword [ebp - 0x98], 0
push ebx
call fcn.00411a15
mov ebx, dword [ebp - 0xa4]
add esp, 4
test ebx, ebx
je 0x40c70c
push dword [ebp - 0x98]
push ebx
call fcn.0040cef0
mov edi, dword [ebp - 0xd8]
add esp, 8
mov dword [edi], eax
call fcn.0040c7b0
test eax, eax
je 0x40c4ef
cmp dword [edi], 0
mov ecx, 0x42cb90
mov eax, str.ture
cmove eax, ecx
push eax
push str.m_bInit___s
call fcn.0040c870
add esp, 8
push ebx
call fcn.00411a15
xor ebx, ebx
add esp, 4
cmp dword [edi], ebx
setne bl
jmp 0x40c730
call fcn.00404c18
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 8]
test eax, eax
jne 0x40c52b
call fcn.0040c7b0
test eax, eax
je 0x40c330
push str.GetBufferSize_zero
jmp 0x40c328
call fcn.00404c18
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 8]
mov edi, eax
lea eax, [edi + 1]
push eax
call fcn.00411cf8
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x40c562
call fcn.0040c7b0
test eax, eax
je 0x40c330
push str.malloc_buffer1_fail
jmp 0x40c328
lea eax, [edi + 1]
push eax
push 0
push ebx
call fcn.0040fff0
add esp, 0xc
call fcn.00404c18
push edi
push ebx
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0xc]
cmp edi, eax
je 0x40c5a3
push ebx
call fcn.00411a15
add esp, 4
call fcn.0040c7b0
test eax, eax
je 0x40c330
push str.ReadBuffer_fail
jmp 0x40c328
mov dword [ebp - 0xb8], 0
mov dword [ebp - 0xb4], 0
push esi
mov byte [ebp - 4], 3
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
push 0
push 0x80
push 2
push 0
push 0x40000000
push esi
lea ecx, [ebp - 0xb8]
call fcn.00405f1c
test eax, eax
jns 0x40c64b
call fcn.0040c7b0
test eax, eax
je 0x40c637
push 3
lea eax, [ebp - 0x90]
push esi
lea ecx, [ebp - 0x94]
mov dword [ebp - 0x94], eax
call fcn.00405123
push dword [ebp - 0x94]
mov byte [ebp - 4], 4
push str.create_file_fail_:__s
call fcn.0040c870
mov eax, dword [ebp - 0x94]
lea ecx, [ebp - 0x90]
add esp, 8
cmp eax, ecx
je 0x40c637
push eax
call fcn.00411a15
add esp, 4
lea ecx, [ebp - 0xb8]
mov byte [ebp - 4], 1
call fcn.00405e90
jmp 0x40c41a
push 0
lea eax, [ebp - 0x9c]
push eax
push edi
push ebx
push dword [ebp - 0xb8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40c66b
call fcn.00405ec3
mov eax, dword [ebp - 0xd4]
mov dword [ebp - 0x98], eax
mov eax, dword [ebp - 0xac]
sub eax, 2
je 0x40c6a3
sub eax, 1
jne 0x40c6f2
push str.CNPPage
lea ecx, [ebp - 0xcc]
call fcn.0040322e
mov dword [ebp - 0xcc], 0x42cafc
jmp 0x40c6bd
push 0x42cae0
lea ecx, [ebp - 0xcc]
call fcn.0040322e
mov dword [ebp - 0xcc], 0x42cadc
mov eax, dword [ebp - 0x98]
push 4
mov dword [ebp - 0xac], eax
lea eax, [ebp - 0xac]
push eax
push 4
push 0
push str.dver
push dword [ebp - 0xc8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea ecx, [ebp - 0xcc]
call fcn.004020dc
mov eax, dword [ebp - 0xb8]
mov byte [ebp - 4], 1
jmp 0x40c40f
lea ecx, [ebp - 0xa0]
call fcn.00405e90
mov eax, dword [ebp - 0xd8]
mov dword [eax], 0
call fcn.0040c7b0
test eax, eax
je 0x40c72e
push str.pBuff_null
call fcn.0040c870
add esp, 4
xor ebx, ebx
mov edx, dword [ebp - 0xa8]
or edi, 0xffffffff
mov byte [ebp - 4], 0
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40c754
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], edi
dec edi
test edi, edi
jg 0x40c770
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, ebx
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.0040d86d
mov esp, ebp
pop ebp
ret 4
push 0x80004005
call fcn.00402dc6
push 0x80004005
call fcn.00402dc6
int3