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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff40
push ebx
push esi
xor ecx, ecx
mov dword [ebp - 0xbc], ecx
mov dword [ebp - 0xc0], ecx
mov dword [ebp - 0xb4], ecx
mov dword [ebp - 0xb8], ecx
mov dword [ebp - 0xb0], ecx
mov dword [ebp - 0xa8], ecx
mov dword [ebp - 0xac], ecx
mov dword [ebp - 0xa0], ecx
mov dword [ebp - 0xa4], ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00403a84
mov eax, dword [ebp - 8]
call fcn.00403a84
xor eax, eax
push ebp
push 0x40f0f3
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
mov eax, dword [ebp - 4]
call fcn.00403894
test eax, eax
je 0x40f0ba
mov eax, dword [ebp - 8]
call fcn.00403894
test eax, eax
je 0x40f0ba
push 0
lea eax, [ebp - 0x9c]
push eax
mov eax, dword [ebp - 4]
call fcn.00403a94
push eax
call sub.KERNEL32.DLL_OpenFile
mov esi, eax
cmp esi, 0xffffffff
jne 0x40ee82
push 0x40f10c
push dword [ebp - 4]
push 0x40f11c
lea edx, [ebp - 0xa4]
xor eax, eax
call fcn.004061f4
push dword [ebp - 0xa4]
lea eax, [ebp - 0xa0]
mov edx, 4
call fcn.00403954
mov eax, dword [ebp - 0xa0]
call fcn.00411020
jmp 0x40f0ba
push 0
push esi
call sub.KERNEL32.DLL_GetFileSize
add eax, 5
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
push eax
lea eax, [ebp - 0x14]
mov ecx, 1
mov edx, dword [0x40ed78]
call fcn.00404220
add esp, 4
mov edx, 0x4121e4
mov eax, dword [ebp - 0x14]
mov ecx, 5
call fcn.0040495c
push 0
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0xc]
sub eax, 5
push eax
mov eax, dword [ebp - 0x14]
add eax, 5
push eax
push esi
call sub.KERNEL32.DLL_ReadFile
test eax, eax
jne 0x40ef1a
push 0x40f128
push dword [ebp - 4]
push 0x40f11c
lea edx, [ebp - 0xac]
xor eax, eax
call fcn.004061f4
push dword [ebp - 0xac]
lea eax, [ebp - 0xa8]
mov edx, 4
call fcn.00403954
mov eax, dword [ebp - 0xa8]
call fcn.00411020
jmp 0x40f0ba
push esi
call sub.KERNEL32.DLL_CloseHandle
cmp dword [ebp - 0xc], 0xa
jbe 0x40ef9c
mov eax, dword [ebp - 0x14]
mov al, byte [eax + 5]
cmp al, byte [0x4121e4]
jne 0x40ef9c
mov eax, dword [ebp - 0x14]
mov al, byte [eax + 6]
cmp al, byte [0x4121e5]
jne 0x40ef9c
mov eax, dword [ebp - 0x14]
mov al, byte [eax + 7]
cmp al, byte [0x4121e6]
jne 0x40ef9c
mov eax, dword [ebp - 0x14]
mov al, byte [eax + 8]
cmp al, byte [0x4121e7]
jne 0x40ef9c
mov eax, dword [ebp - 0x14]
mov al, byte [eax + 9]
cmp al, byte [0x4121e8]
jne 0x40ef9c
push 0x40f13c
push dword [ebp - 4]
push 0x40f14c
push dword [ebp - 8]
lea eax, [ebp - 0xb0]
mov edx, 4
call fcn.00403954
mov eax, dword [ebp - 0xb0]
call fcn.00411020
jmp 0x40f0ba
mov edx, dword [ebp - 0xc]
dec edx
sub edx, 5
jb 0x40efe2
inc edx
mov dword [ebp - 0x10], 5
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x10]
xor byte [eax + ecx], 0xc2
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x10]
movzx eax, byte [eax + ecx]
add ax, 0x79
cmp ax, 0xff
jle 0x40efd0
sub ax, 0xff
dec eax
mov ecx, dword [ebp - 0x14]
mov esi, dword [ebp - 0x10]
add ecx, esi
push ecx
pop ecx
mov byte [ecx], al
inc dword [ebp - 0x10]
dec edx
jne 0x40efad
mov eax, dword [ebp - 8]
call fcn.00403894
test eax, eax
jne 0x40eff9
lea eax, [ebp - 8]
mov edx, dword [ebp - 4]
call fcn.004037b4
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
mov eax, dword [ebp - 8]
call fcn.00403a94
push eax
call sub.KERNEL32.DLL_CreateFileA
mov esi, eax
cmp esi, 0xffffffff
jne 0x40f05d
push 0x40f15c
push dword [ebp - 8]
push 0x40f11c
lea edx, [ebp - 0xb8]
xor eax, eax
call fcn.004061f4
push dword [ebp - 0xb8]
lea eax, [ebp - 0xb4]
mov edx, 4
call fcn.00403954
mov eax, dword [ebp - 0xb4]
call fcn.00411020
jmp 0x40f0ba
push 0
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x14]
push eax
push esi
call sub.KERNEL32.DLL_WriteFile
test eax, eax
je 0x40f079
mov bl, 1
jmp 0x40f0b4
push 0x40f170
push dword [ebp - 8]
push 0x40f11c
lea edx, [ebp - 0xc0]
xor eax, eax
call fcn.004061f4
push dword [ebp - 0xc0]
lea eax, [ebp - 0xbc]
mov edx, 4
call fcn.00403954
mov eax, dword [ebp - 0xbc]
call fcn.00411020
push esi
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40f0fa
lea eax, [ebp - 0xc0]
mov edx, 9
call fcn.00403740
lea eax, [ebp - 0x14]
mov edx, dword [0x40ed78]
call fcn.0040422c
lea eax, [ebp - 8]
mov edx, 2
call fcn.00403740
ret