Function at 0x405f98
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push edi
push esi
push ebp
push ebx
sub esp, 0x10
mov edi, eax
xor edx, edx
push edx
push 0x80
push 3
push edx
push 1
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4061ec
xor edx, edx
mov dword [esp], edx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
push ebp
call fcn.00406f0e
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4061c7
lea edx, [esp]
push 0
push edx
push ebp
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4060ef
cmp ebp, dword [esp]
jne 0x4060ef
xor edx, edx
mov dword [esp + 0xc], edx
push 0x41502c
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edx, dword [esp]
sub edx, eax
je 0x406060
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov edi, dword [esp + 0xc]
lea esi, [ebx + edi]
movsx edx, byte [esi]
push edx
call fcn.00406bdf
pop ecx
cmp eax, 0x64
je 0x406132
push 0x41502c
add edi, 1
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edx, dword [esp]
sub edx, eax
cmp edi, edx
jb 0x40602b
mov esi, dword [esp + 8]
mov edi, dword [esp + 4]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edx, edx
push edx
push 0x80
push 2
push edx
push 1
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x406114
lea edx, [esp]
push 0
push edx
push ebp
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4060a3
cmp ebp, dword [esp]
je 0x4060ce
push 0x10
push 0x40e040
push 0x415328
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.00406f1c
xor eax, eax
add esp, 0x14
pop ebx
pop ebp
pop esi
pop edi
ret
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.00406f1c
mov eax, 1
add esp, 0x14
pop ebx
pop ebp
pop esi
pop edi
ret
push 0x10
push 0x40e040
push 0x415310
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
add esp, 0x10
pop ebx
pop ebp
pop esi
pop edi
ret
push 0x10
push 0x40e040
push 0x4152e0
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
add esp, 0x10
pop ebx
pop ebp
pop esi
pop edi
ret
movsx edx, byte [esi + 1]
push edx
call fcn.00406bdf
pop ecx
cmp eax, 0x33
jne 0x406041
movsx edx, byte [esi + 2]
push edx
call fcn.00406bdf
pop ecx
cmp eax, 0x64
jne 0x406041
movsx edx, byte [esi + 3]
push edx
call fcn.00406bdf
pop ecx
cmp eax, 0x38
jne 0x406041
movsx edx, byte [esi + 4]
push edx
call fcn.00406bdf
pop ecx
cmp eax, 0x2e
jne 0x406041
movsx edx, byte [esi + 5]
push edx
call fcn.00406bdf
pop ecx
cmp eax, 0x64
jne 0x406041
movsx edx, byte [esi + 6]
push edx
call fcn.00406bdf
pop ecx
cmp eax, 0x6c
jne 0x406041
movsx edx, byte [esi + 7]
push edx
call fcn.00406bdf
pop ecx
cmp eax, 0x6c
jne 0x406041
mov byte [esi + 3], 0x66
jmp 0x406041
push 0x10
push 0x40e040
push 0x4152fc
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
add esp, 0x10
pop ebx
pop ebp
pop esi
pop edi
ret
push 0x10
push 0x40e040
push 0x4152e0
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
add esp, 0x10
pop ebx
pop ebp
pop esi
pop edi
ret