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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x85c
mov eax, dword [0x5a53f4]
xor eax, esp
mov dword [esp + 0x858], eax
push ebx
mov ebx, ecx
cmp dword [ebx + 4], 0
push esi
push edi
jne 0x408288
cmp dword [ebx], 0xffffffff
jne 0x408288
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0x252]
push ecx
mov dword [ebx + 4], 1
mov word [esp + 0x254], ax
call fcn.00534b20
xor edx, edx
push 0x206
push edx
lea eax, [esp + 0x56]
push eax
mov word [esp + 0x58], dx
call fcn.00534b20
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
add esp, 0x18
push 0x104
lea ecx, [esp + 0x454]
push ecx
push 0
call esi
mov eax, dword [0x5a94f0]
push 0x104
lea edx, [esp + 0x65c]
push edx
push eax
call esi
mov edi, dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
lea ecx, [esp + 0x450]
push ecx
call edi
mov esi, 0x104
lea ecx, [esp + 0x40]
cmp word [ecx], 0
je 0x407fd5
add ecx, 2
sub esi, 1
jne 0x407fc5
jmp 0x407ff6
test esi, esi
je 0x407ff6
mov edx, 0x104
sub edx, esi
mov ecx, 0x104
push eax
sub ecx, edx
lea edx, [esp + edx*2 + 0x44]
mov eax, SysReAllocString
call fcn.00407c00
lea edx, [esp + 0x40]
push 0x2e
push edx
call fcn.00535660
add esp, 8
test eax, eax
je 0x40800f
xor ecx, ecx
mov word [eax + 2], cx
lea edx, [esp + 0x658]
push edx
call edi
mov ecx, 0x104
lea edx, [esp + 0x40]
cmp word [edx], 0
je 0x408032
add edx, 2
sub ecx, 1
jne 0x408022
jmp 0x408053
test ecx, ecx
je 0x408053
mov edx, 0x104
sub edx, ecx
mov ecx, 0x104
push eax
sub ecx, edx
lea edx, [esp + edx*2 + 0x44]
mov eax, SysReAllocString
call fcn.00407c00
lea eax, [esp + 0x40]
push 0x2e
push eax
call fcn.00535660
add esp, 8
test eax, eax
je 0x40806c
xor ecx, ecx
mov word [eax + 2], cx
mov ecx, 0x104
lea eax, [esp + 0x40]
cmp word [eax], 0
je 0x408085
add eax, 2
sub ecx, 1
jne 0x408075
jmp 0x4080aa
test ecx, ecx
je 0x4080aa
mov eax, 0x104
sub eax, ecx
mov ecx, 0x104
sub ecx, eax
lea edx, [esp + eax*2 + 0x40]
push 0x585628
mov eax, SysReAllocString
call fcn.00407c00
lea eax, [esp + 0x248]
lea esi, [esp + 0x450]
mov ecx, eax
mov edx, 0x104
sub esi, ecx
lea ecx, [edx + 0x7ffffefa]
test ecx, ecx
je 0x4080e1
movzx ecx, word [esi + eax]
test cx, cx
je 0x4080e1
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x4080c1
jmp 0x4080e5
test edx, edx
jne 0x4080e8
sub eax, 2
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
xor edx, edx
mov word [eax], dx
push 0x585630
lea eax, [esp + 0x24c]
push eax
call esi
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0x24c]
push edx
call esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0x80
push 3
push 0
push 7
push 0x40000000
lea eax, [esp + 0x260]
push eax
call esi
mov dword [ebx], eax
cmp eax, 0xffffffff
je 0x408158
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0x500000
jbe 0x40819c
mov eax, dword [ebx]
cmp eax, 0xffffffff
je 0x408158
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0x80
push 2
push 0
push 3
push 0x40000000
lea ecx, [esp + 0x260]
push ecx
call esi
mov dword [ebx], eax
cmp eax, 0xffffffff
je 0x408288
push 0
lea edx, [esp + 0x24]
push edx
push 2
lea ecx, [esp + 0x34]
push ecx
push eax
mov dword [esp + 0x3c], 0xfeff
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebx]
push 2
push 0
push 0
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x38]
push edx
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessTimes]
test eax, eax
je 0x40824e
lea ecx, [esp + 0x20]
push ecx
mov edx, ecx
push edx
call dword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
movzx edx, word [esp + 0x1e]
movzx eax, word [esp + 0x1c]
movzx ecx, word [esp + 0x1a]
push edx
movzx edx, word [esp + 0x1c]
push eax
movzx eax, word [esp + 0x1e]
push ecx
movzx ecx, word [esp + 0x1e]
push edx
movzx edx, word [esp + 0x20]
push eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [esp + 0x470]
push eax
push str.Process__s__d___
push ebx
call fcn.00407e40
add esp, 0x2c
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x858]
xor ecx, esp
call fcn.005308cb
mov esp, ebp
pop ebp
ret
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx edx, word [esp + 0x16]
movzx eax, word [esp + 0x12]
movzx ecx, word [esp + 0x10]
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea edx, [esp + 0x460]
push edx
push str.Process__s__d____d__02d__02d_
push ebx
call fcn.00407e40
add esp, 0x1c
mov ecx, dword [esp + 0x864]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.005308cb
mov esp, ebp
pop ebp
ret