Function at 0x40cd80
Capabilities:
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48ff30
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x4bcad4]
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
lea eax, [ebp - 0x20]
push eax
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov cx, word [ebp - 0x1a]
cmp cx, word [esi + 0x3a]
je 0x40ce2b
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x40cdd5
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi], 0xffffffff
sub esp, 0x18
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x5c], esp
mov eax, esp
je 0x40cdf4
mov dword [eax], vtable.std::tr1::_Impl_base2_bool__char_const___struct__WIN32_FIND_DATAA_const__.0
mov dword [eax], vtable.._AV___Impl_no_alloc2_U___Callable_obj_V_lambda0___A0xd5083784_us___0A__tr1_std___NPBDABU_WIN32_FIND_DATAA___tr1_std__.0
mov dword [eax + 4], esi
mov dword [eax + 8], ecx
mov dword [eax + 0x10], eax
cmp dword [esi + 0x58], 0x10
lea eax, [esi + 0x44]
jb 0x40ce02
mov eax, dword [eax]
xor edi, edi
push edi
push eax
call fcn.0040c250
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
mov dword [esi + 0x34], edx
mov edx, dword [ebp - 0x14]
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], ecx
add esp, 0x20
mov dword [esi + 0x40], edx
mov dword [esi + 0x30], edi
jmp 0x40ce2d
xor edi, edi
cmp dword [esi], 0xffffffff
jne 0x40ce3d
lea eax, [ebp - 0x20]
push eax
mov ecx, esi
call fcn.0040be20
mov ebx, dword [esi]
cmp ebx, 0xffffffff
je 0x40cf76
cmp byte [esi + 0x1c], 0
mov dword [ebp - 0x5c], edi
je 0x40cf0e
cmp dword [esi + 0xb0], edi
je 0x40cf0e
mov ecx, dword [esi + 0x7c]
mov ebx, 0xf
mov eax, ecx
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x28], ebx
mov byte [ebp - 0x3c], 0
lea edi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40ce78
sub eax, edi
push eax
push ecx
lea ecx, [ebp - 0x3c]
call fcn.00401602
lea ecx, [ebp - 0x3c]
push ecx
lea edx, [ebp - 0x58]
push edx
lea ecx, [esi + 0xa0]
mov dword [ebp - 4], 0
call fcn.0040c450
mov edi, 0x10
mov byte [ebp - 4], 2
cmp dword [ebp - 0x28], edi
jb 0x40cebf
mov eax, dword [ebp - 0x3c]
push eax
call fcn.004777ca
add esp, 4
push 2
push 0x4ae4e0
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x2c], 0
mov byte [ebp - 0x3c], 0
call fcn.00403571
mov eax, dword [ebp - 0x58]
cmp dword [ebp - 0x44], edi
jae 0x40cee7
lea eax, [ebp - 0x58]
mov edx, dword [ebp - 0x48]
push 0
lea ecx, [ebp - 0x5c]
push ecx
push edx
push eax
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 0x44], edi
jb 0x40cf2e
mov ecx, dword [ebp - 0x58]
push ecx
call fcn.004777ca
add esp, 4
jmp 0x40cf2e
mov edx, dword [esi + 0x7c]
mov eax, edx
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40cf16
push 0
lea ecx, [ebp - 0x5c]
push ecx
sub eax, edi
push eax
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esi]
mov edi, dword [esi + 0x2c]
cmp eax, 0xffffffff
je 0x40cf76
lea edx, [ebp - 0x60]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x64], eax
cmp eax, 0xffffffff
jne 0x40cf58
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40cf76
mov eax, dword [ebp - 0x64]
xor ecx, ecx
shl edi, 0x14
cmp dword [ebp - 0x60], ecx
jb 0x40cf76
ja 0x40cf68
cmp eax, edi
jb 0x40cf76
inc dword [esi + 0x30]
lea eax, [ebp - 0x20]
push eax
mov ecx, esi
call fcn.0040be20
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.004751f1
mov esp, ebp
pop ebp
ret