Function at 0x10045e9
Capabilities:
Get common file path
Get file size
Get system information on windows
Set current directory
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x970
mov eax, dword [0x1009088]
push ebx
push edi
push 0xffffffffffffffec
push dword [0x10092e0]
xor ebx, ebx
mov dword [ebp - 4], eax
mov dword [ebp - 0x944], ebx
call dword [sym.imp.USER32.dll_GetWindowLongW]
mov edi, eax
and edi, 0x400000
cmp dword [0x1009d44], ebx
je 0x1004c42
cmp dword [0x1009d1c], ebx
je 0x1004c42
push 0x104
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x1004657
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push esi
push ebx
push 0x80
push 4
push ebx
push 1
push 0xc0000000
push 0x100990c
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 0x940], esi
jne 0x100468c
push 0x22
call fcn.01005193
jmp 0x1004c41
cmp dword [0x1009d40], ebx
je 0x10046a7
push ebx
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
jmp 0x10046b2
push 2
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [0x1009d40], ebx
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
jne 0x10046d1
push ebx
push dword [ebp - 0x940]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
jne 0x10046f3
push ebx
lea eax, [ebp - 0x93c]
push eax
push 2
lea eax, [ebp - 0x414]
push eax
push dword [ebp - 0x940]
mov word [ebp - 0x414], 0xfeff
call esi
push 0x23
lea eax, [ebp - 0x414]
push eax
call fcn.01005095
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [ebp - 0x93c]
push eax
lea eax, [ebp - 0x414]
push eax
call ebx
shl eax, 1
push eax
lea eax, [ebp - 0x414]
push eax
push dword [ebp - 0x940]
call esi
push 0x32
lea eax, [ebp - 0x61c]
push eax
call fcn.01005095
neg edi
sbb edi, edi
and edi, 0x20
inc edi
mov dword [ebp - 0x94c], edi
xor edi, edi
push edi
push edi
push edi
push edi
push dword [ebp - 0x94c]
push 0x800
call dword [sym.imp.KERNEL32.dll_GetDateFormatW]
cmp eax, edi
mov dword [ebp - 0x948], eax
je 0x10047d0
lea eax, [eax + eax + 2]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, edi
mov dword [ebp - 0x944], eax
je 0x10047d0
push dword [ebp - 0x948]
push eax
push edi
push edi
push dword [ebp - 0x94c]
push 0x800
call dword [sym.imp.KERNEL32.dll_GetDateFormatW]
test eax, eax
je 0x10047b6
push dword [ebp - 0x944]
lea eax, [ebp - 0x61c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push dword [ebp - 0x944]
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp - 0x944], edi
push edi
push edi
push edi
push edi
push 2
push 0x800
call dword [sym.imp.KERNEL32.dll_GetTimeFormatW]
cmp eax, edi
mov dword [ebp - 0x948], eax
je 0x100481f
lea eax, [eax + eax + 2]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, edi
mov dword [ebp - 0x944], eax
je 0x100481f
push dword [ebp - 0x948]
push eax
push edi
push edi
push 2
push 0x800
call dword [sym.imp.KERNEL32.dll_GetTimeFormatW]
push 0x24
lea eax, [ebp - 0x824]
push eax
call fcn.01005095
cmp dword [ebp - 0x944], edi
lea eax, [ebp - 0x61c]
je 0x100486f
push dword [ebp - 0x944]
push eax
lea eax, [ebp - 0x824]
push eax
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push dword [ebp - 0x944]
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x100488e
push eax
lea eax, [ebp - 0x61c]
push eax
lea eax, [ebp - 0x824]
push eax
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push edi
lea eax, [ebp - 0x93c]
push eax
lea eax, [ebp - 0x414]
push eax
call ebx
shl eax, 1
push eax
lea eax, [ebp - 0x414]
push eax
push dword [ebp - 0x940]
call esi
push 0x2d
lea eax, [ebp - 0x414]
push eax
call fcn.01005095
push edi
lea eax, [ebp - 0x93c]
push eax
lea eax, [ebp - 0x414]
push eax
call ebx
shl eax, 1
push eax
lea eax, [ebp - 0x414]
push eax
push dword [ebp - 0x940]
call esi
push 0x45
pop ecx
xor eax, eax
lea edi, [ebp - 0x938]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x938]
push eax
mov dword [ebp - 0x938], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov eax, dword [ebp - 0x928]
sub eax, 0
je 0x1004929
dec eax
je 0x1004925
dec eax
lea eax, [ebp - 0x414]
je 0x1004921
push 0x32
jmp 0x1004931
push 0x2f
jmp 0x1004931
push 0x30
jmp 0x100492b
push 0x31
lea eax, [ebp - 0x414]
push eax
call fcn.01005095
push 0
lea eax, [ebp - 0x93c]
push eax
lea eax, [ebp - 0x414]
push eax
call ebx
shl eax, 1
push eax
lea eax, [ebp - 0x414]
push eax
push dword [ebp - 0x940]
call esi
cmp dword [ebp - 0x928], 2
jne 0x10049ee
push 9
pop ecx
xor eax, eax
lea edi, [ebp - 0x970]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x970]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
xor eax, eax
mov ecx, 0x104
lea edi, [ebp - 0x414]
rep stosd dword es:[edi], eax
movzx eax, word [ebp - 0x970]
sub eax, 0
je 0x10049b2
dec eax
je 0x10049ae
dec eax
je 0x10049aa
dec eax
jne 0x10049c0
push 0x5d
jmp 0x10049b4
push 0x5c
jmp 0x10049b4
push 0x5b
jmp 0x10049b4
push 0x5a
lea eax, [ebp - 0x414]
push eax
call fcn.01005095
cmp word [ebp - 0x414], 0
je 0x10049ee
push 0
lea eax, [ebp - 0x93c]
push eax
lea eax, [ebp - 0x414]
push eax
call ebx
shl eax, 1
push eax
lea eax, [ebp - 0x414]
push eax
push dword [ebp - 0x940]
call esi
push 0x2e
lea eax, [ebp - 0x61c]
push eax
call fcn.01005095
mov edi, dword [sym.imp.USER32.dll_wsprintfW]
lea eax, [ebp - 0x924]
push eax
mov eax, dword [ebp - 0x92c]
and eax, 0xffff
push eax
push dword [ebp - 0x930]
lea eax, [ebp - 0x61c]
push dword [ebp - 0x934]
push eax
lea eax, [ebp - 0x414]
push eax
call edi
add esp, 0x18
push 0
lea eax, [ebp - 0x93c]
push eax
lea eax, [ebp - 0x414]
push eax
call ebx
shl eax, 1
push eax
lea eax, [ebp - 0x414]
push eax
push dword [ebp - 0x940]
call esi
push 0x49
lea eax, [ebp - 0x61c]
push eax
call fcn.01005095
mov eax, dword [0x1009d28]
mov ecx, dword [0x1009d30]
mov edx, eax
sub edx, ecx
sub edx, dword [0x1009d2c]
push edx
push ecx
push dword [0x1009d2c]
push eax
lea eax, [ebp - 0x61c]
push eax
lea eax, [ebp - 0x414]
push eax
call edi
add esp, 0x18
push 0
lea eax, [ebp - 0x93c]
push eax
lea eax, [ebp - 0x414]
push eax
call ebx
shl eax, 1
push eax
lea eax, [ebp - 0x414]
push eax
push dword [ebp - 0x940]
call esi
cmp dword [0x1009d58], 0
je 0x1004b5f
push 0x25
lea eax, [ebp - 0x61c]
push eax
call fcn.01005095
push 0x10094fc
lea eax, [ebp - 0x61c]
push eax
lea eax, [ebp - 0x414]
push eax
call edi
add esp, 0xc
push 0
lea eax, [ebp - 0x93c]
push eax
lea eax, [ebp - 0x414]
push eax
call ebx
shl eax, 1
push eax
lea eax, [ebp - 0x414]
push eax
push dword [ebp - 0x940]
call esi
push 0x26
lea eax, [ebp - 0x61c]
push eax
call fcn.01005095
push 0x10092f4
lea eax, [ebp - 0x61c]
push eax
lea eax, [ebp - 0x414]
push eax
call edi
add esp, 0xc
push 0
lea eax, [ebp - 0x93c]
push eax
lea eax, [ebp - 0x414]
push eax
call ebx
mov edi, dword [ebp - 0x940]
shl eax, 1
push eax
lea eax, [ebp - 0x414]
push eax
push edi
call esi
jmp 0x1004b65
mov edi, dword [ebp - 0x940]
push 0x27
lea eax, [ebp - 0x414]
push eax
call fcn.01005095
push 0
lea eax, [ebp - 0x93c]
push eax
lea eax, [ebp - 0x414]
push eax
call ebx
shl eax, 1
push eax
lea eax, [ebp - 0x414]
push eax
push edi
call esi
push 0x28
lea eax, [ebp - 0x414]
push eax
call fcn.01005095
push 0
lea eax, [ebp - 0x93c]
push eax
lea eax, [ebp - 0x414]
push eax
call ebx
shl eax, 1
push eax
lea eax, [ebp - 0x414]
push eax
push edi
call esi
push edi
call fcn.01004197
mov eax, dword [0x1009d2c]
mov ecx, dword [0x1009d30]
add ecx, eax
cmp dword [0x1009d28], ecx
jbe 0x1004c3a
push 0x29
lea eax, [ebp - 0x414]
push eax
call fcn.01005095
push 0
lea eax, [ebp - 0x93c]
push eax
lea eax, [ebp - 0x414]
push eax
call ebx
shl eax, 1
push eax
lea eax, [ebp - 0x414]
push eax
push edi
call esi
push 0x45
lea eax, [ebp - 0x414]
push eax
call fcn.01005095
push 0
lea eax, [ebp - 0x93c]
push eax
lea eax, [ebp - 0x414]
push eax
call ebx
shl eax, 1
push eax
lea eax, [ebp - 0x414]
push eax
push edi
call esi
push edi
call fcn.01003f95
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
mov ecx, dword [ebp - 4]
pop edi
pop ebx
call fcn.01006e99
leave
ret