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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x101bb14d
mov eax, dword fs:[0]
push eax
sub esp, 0x60
mov eax, dword [0x10247db0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x54], ecx
mov ecx, dword [ebp + 8]
call fcn.10044e20
movzx eax, al
test eax, eax
je 0x1012ed41
xor eax, eax
jmp 0x1012efa4
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x54]
add ecx, 0x20
call fcn.10045070
push 0
push 0x80
push 3
push 0
push 0
push connect
mov ecx, dword [ebp + 8]
call fcn.10044e70
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0xffffffff
jne 0x1012ed99
push 0
push str.N3TableBase___Cant_open_file_read__File_Handle_error_n
mov ecx, dword [ebp + 8]
call fcn.10044e70
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
jmp 0x1012efa4
push str..tmp
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0x2c]
push eax
call fcn.10049f10
add esp, 0xc
mov dword [ebp - 4], 0
mov dword [ebp - 0x5c], 0
lea ecx, [ebp - 0x5c]
push ecx
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0
ja 0x1012ee0c
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x2c]
call fcn.10044e70
push eax
call fcn.1017a130
add esp, 4
mov dword [ebp - 0x60], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.100450b0
mov eax, dword [ebp - 0x60]
jmp 0x1012efa4
mov ecx, dword [ebp - 0x44]
push ecx
call fcn.10040b60
add esp, 4
mov dword [ebp - 0x64], eax
mov edx, dword [ebp - 0x64]
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x50], 0
push 0
lea eax, [ebp - 0x50]
push eax
mov ecx, dword [ebp - 0x44]
push ecx
mov edx, dword [ebp - 0x3c]
push edx
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, 0x816
mov word [ebp - 0x38], dx
mov eax, 0x6081
mov word [ebp - 0x48], ax
mov ecx, 0x1608
mov word [ebp - 0x4c], cx
mov dword [ebp - 0x40], 0
jmp 0x1012ee77
mov edx, dword [ebp - 0x40]
add edx, 1
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0x40]
cmp eax, dword [ebp - 0x44]
jae 0x1012eec1
mov ecx, dword [ebp - 0x3c]
add ecx, dword [ebp - 0x40]
movzx edx, byte [ecx]
movzx eax, word [ebp - 0x38]
sar eax, 8
xor edx, eax
mov byte [ebp - 0x31], dl
mov ecx, dword [ebp - 0x3c]
add ecx, dword [ebp - 0x40]
movzx edx, byte [ecx]
movzx eax, word [ebp - 0x38]
add edx, eax
movzx ecx, word [ebp - 0x48]
imul edx, ecx
movzx eax, word [ebp - 0x4c]
add edx, eax
mov word [ebp - 0x38], dx
mov ecx, dword [ebp - 0x3c]
add ecx, dword [ebp - 0x40]
mov dl, byte [ebp - 0x31]
mov byte [ecx], dl
jmp 0x1012ee6e
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
lea ecx, [ebp - 0x2c]
call fcn.10044e70
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x30], eax
push 0
lea eax, [ebp - 0x50]
push eax
mov ecx, dword [ebp - 0x44]
push ecx
mov edx, dword [ebp - 0x3c]
push edx
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0x68], edx
mov eax, dword [ebp - 0x68]
push eax
call fcn.10159b80
add esp, 4
mov dword [ebp - 0x3c], 0
push 0
push 0x80
push 3
push 0
push 0
push connect
lea ecx, [ebp - 0x2c]
call fcn.10044e70
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x30]
push ecx
mov ecx, dword [ebp - 0x54]
call fcn.1012fc20
mov dword [ebp - 0x58], eax
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x58], 0
jne 0x1012ef7b
push 0
push str.N3TableBase___incorrect_table_n
mov ecx, dword [ebp + 8]
call fcn.10044e70
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [ebp - 0x2c]
call fcn.10044e70
push eax
call fcn.1017a130
add esp, 4
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x6c], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.100450b0
mov eax, dword [ebp - 0x6c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10159b70
mov esp, ebp
pop ebp
ret 4