Function at 0x10046fc
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 [0x1007c24], ebx
je 0x10049f1
push edi
xor eax, eax
cmp dword [0x100703c], 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 0x100473d
push 0x1007890
push 0xffffffffffffffff
push 0x1001828
mov dword [0x100703c], ebx
call fcn.010046fc
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.01004b95
test eax, eax
je 0x10049f0
push esi
push 0x7530
push dword [0x1007c20]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
je 0x10049e6
push ebx
mov esi, 0x80
push esi
push 4
lea eax, [ebp - 0x18]
push eax
push 3
push 0xc0000000
push 0x1007a90
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
je 0x10049e6
lea ecx, [ebp - 0x20]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
mov edi, 0x1007c68
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, 0x1007c28
push esi
push 0x100180c
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 [0x1007d66], 0
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push 0x10017c8
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 [0x1007d66], 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 0x1004887
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 0x10048fe
mov eax, dword [ebp + 0xc]
and eax, 0x1fff0000
cmp eax, 0x80000
jne 0x10048a1
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 0x10048cd
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x10049e6
push dword [ebp + 0xc]
and word [eax*2 + 0x1007c64], 0
push 0x10017c0
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push 0x10017a8
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
jmp 0x1004906
and word [0x1007c68], 0
push 0x1001780
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 0x10049aa
push 0x1001758
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 0x10015d4
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 [0x1007c20]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
lea eax, [ebp - 0x18]
push eax
call fcn.01004d91
pop esi
pop edi
pop ebx
leave
ret 0xc