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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x101b415d
mov eax, dword fs:[0]
push eax
sub esp, 0x60
mov eax, dword [0x10245db0]
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.10044d30
movzx eax, al
test eax, eax
je 0x101295d1
xor eax, eax
jmp 0x10129834
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x54]
add ecx, 0x20
call fcn.10044f80
push 0
push 0x80
push 3
push 0
push 0
push connect
mov ecx, dword [ebp + 8]
call fcn.10044d80
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0xffffffff
jne 0x10129629
push 0
push str.N3TableBase___Cant_open_file_read__File_Handle_error_n
mov ecx, dword [ebp + 8]
call fcn.10044d80
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
jmp 0x10129834
push str..tmp
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0x2c]
push eax
call fcn.10049750
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 0x1012969c
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x2c]
call fcn.10044d80
push eax
call fcn.101731b0
add esp, 4
mov dword [ebp - 0x60], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.10044fc0
mov eax, dword [ebp - 0x60]
jmp 0x10129834
mov ecx, dword [ebp - 0x44]
push ecx
call fcn.10040bc0
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 0x10129707
mov edx, dword [ebp - 0x40]
add edx, 1
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0x40]
cmp eax, dword [ebp - 0x44]
jae 0x10129751
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 0x101296fe
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
lea ecx, [ebp - 0x2c]
call fcn.10044d80
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.10154230
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.10044d80
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.1012a440
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 0x1012980b
push 0
push str.N3TableBase___incorrect_table_n
mov ecx, dword [ebp + 8]
call fcn.10044d80
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [ebp - 0x2c]
call fcn.10044d80
push eax
call fcn.101731b0
add esp, 4
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x6c], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.10044fc0
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.10154220
mov esp, ebp
pop ebp
ret 4