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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x40
push ebx
xor ebx, ebx
cmp dword [0x1015024], ebx
je 0x1005a8a
push edi
xor eax, eax
cmp dword [0x1014054], ebx
lea edi, [ebp - 0x40]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
je 0x10057d6
push 0x1014c90
push 0xffffffffffffffff
push 0x1001888
mov dword [0x1014054], ebx
call fcn.01005795
lea eax, [ebp - 0x40]
push ebx
mov dword [ebp - 0x14], eax
push 4
lea eax, [ebp - 0x18]
push eax
mov dword [ebp - 0x18], 0xc
mov dword [ebp - 0x10], ebx
call fcn.0100ca3c
test eax, eax
je 0x1005a89
push esi
push 0x7530
push dword [0x1015020]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
je 0x1005a7f
push ebx
mov esi, 0x80
push esi
push 4
lea eax, [ebp - 0x18]
push eax
push 3
push 0xc0000000
push 0x1014e90
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
je 0x1005a7f
lea ecx, [ebp - 0x20]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
mov edi, 0x1015068
push edi
push ebx
push ebx
mov dword [ebp - 0x1c], ebx
push 1
mov ebx, 0x800
push ebx
mov dword [ebp - 0x24], eax
call dword [sym.imp.KERNEL32.dll_GetDateFormatW]
push 0x20
mov esi, 0x1015028
push esi
push 0x100186c
push 0
push 8
push ebx
call dword [sym.imp.KERNEL32.dll_GetTimeFormatW]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
push edi
call ebx
push 0x7f
pop ecx
sub ecx, eax
push ecx
push esi
push edi
call dword [sym.imp.msvcrt.dll_wcsncat]
and word [0x1015166], 0
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push 0x1001828
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push edi
call ebx
push 0x7f
pop ecx
sub ecx, eax
push ecx
push esi
push edi
call dword [sym.imp.msvcrt.dll_wcsncat]
and word [0x1015166], 0
add esp, 0xc
push edi
call ebx
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0xc]
push ecx
shl eax, 1
push eax
push edi
push dword [ebp - 8]
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 4]
add dword [ebp - 0x24], eax
cmp dword [ebp + 8], 0
je 0x1005920
push dword [ebp + 8]
call ebx
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0xc]
push ecx
shl eax, 1
push eax
push dword [ebp + 8]
mov dword [ebp - 4], eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 4]
add dword [ebp - 0x24], eax
cmp dword [ebp + 0xc], 0xffffffff
je 0x1005997
mov eax, dword [ebp + 0xc]
and eax, 0x1fff0000
cmp eax, 0x80000
jne 0x100593a
and word [ebp + 0xe], 0
push 0
push 0x80
push edi
push 0x400
push dword [ebp + 0xc]
push 0
push 0x1000
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
test eax, eax
jne 0x1005966
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1005a7f
push dword [ebp + 0xc]
and word [eax*2 + 0x1015064], 0
push 0x100181c
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push 0x1001804
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
jmp 0x100599f
and word [0x1015068], 0
push 0x10017dc
push esi
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
push esi
call ebx
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0xc]
push ecx
shl eax, 1
push eax
push esi
push dword [ebp - 8]
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 4]
add dword [ebp - 0x24], eax
push edi
call ebx
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0xc]
push ecx
shl eax, 1
push eax
push edi
push dword [ebp - 8]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 4], eax
call edi
mov eax, dword [ebp - 4]
add dword [ebp - 0x24], eax
cmp dword [ebp + 0x10], 0
je 0x1005a43
push 0x10017b4
push esi
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
push esi
call ebx
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0xc]
push ecx
shl eax, 1
push eax
push esi
push dword [ebp - 8]
mov dword [ebp - 4], eax
call edi
mov eax, dword [ebp - 4]
push dword [ebp + 0x10]
add dword [ebp - 0x24], eax
call ebx
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0xc]
push ecx
shl eax, 1
push eax
push dword [ebp + 0x10]
mov dword [ebp - 4], eax
push dword [ebp - 8]
call edi
mov eax, dword [ebp - 4]
add dword [ebp - 0x24], eax
push 0x10017ac
push esi
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
push esi
call ebx
mov ebx, eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0xc]
push eax
shl ebx, 1
push ebx
push esi
push dword [ebp - 8]
call edi
push dword [ebp - 8]
add dword [ebp - 0x24], ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [0x1015020]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
lea eax, [ebp - 0x18]
push eax
call fcn.0100cc38
pop esi
pop edi
pop ebx
leave
ret 0xc