Function at 0x4be240
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0xa
push 0
push 0
dec ecx
jne 0x4be248
push ebx
push esi
push edi
mov ebx, eax
xor eax, eax
push ebp
push 0x4be68b
push dword fs:[eax]
mov dword fs:[eax], esp
xor edx, edx
mov eax, dword [ebx + 0x328]
call fcn.00435c58
xor edx, edx
mov eax, dword [ebx + 0x364]
call fcn.00462360
xor edx, edx
mov eax, dword [ebx + 0x36c]
call fcn.00462360
mov byte [ebx + 0x5c4], 0xaa
push 0
lea eax, [ebx + 0x3974]
push eax
push 4
lea eax, [ebx + 0x5c4]
push eax
mov eax, dword [ebx + 0x3e0]
push eax
call sub.kernel32.dll_WriteFile_1
push 0
lea eax, [ebx + 0x3978]
push eax
push 4
lea eax, [ebx + 0x560]
push eax
mov eax, dword [ebx + 0x3e0]
push eax
call sub.kernel32.dll_ReadFile_1
movzx esi, byte [ebx + 0x560]
lea edx, [ebp - 8]
mov edi, dword [ebx + 0x36c]
mov eax, edi
call fcn.00462330
push dword [ebp - 8]
push 0x4be6a4
lea edx, [ebp - 0xc]
mov eax, esi
and eax, 0xf
call fcn.00409200
push dword [ebp - 0xc]
lea eax, [ebp - 4]
mov edx, 3
call fcn.00404f18
mov edx, dword [ebp - 4]
mov eax, edi
call fcn.00462360
lea edx, [ebp - 0x14]
mov edi, dword [ebx + 0x364]
mov eax, edi
call fcn.00462330
push dword [ebp - 0x14]
push 0x4be6a4
lea edx, [ebp - 0x18]
mov eax, esi
test eax, eax
jns 0x4be336
add eax, 0xf
sar eax, 4
and eax, 0xf
call fcn.00409200
push dword [ebp - 0x18]
lea eax, [ebp - 0x10]
mov edx, 3
call fcn.00404f18
mov edx, dword [ebp - 0x10]
mov eax, edi
call fcn.00462360
mov byte [ebx + 0x5c4], 0x85
push 0
lea eax, [ebx + 0x3974]
push eax
push 4
lea eax, [ebx + 0x5c4]
push eax
mov eax, dword [ebx + 0x3e0]
push eax
call sub.kernel32.dll_WriteFile_1
push 0
lea eax, [ebx + 0x3978]
push eax
push 4
lea eax, [ebx + 0x560]
push eax
mov eax, dword [ebx + 0x3e0]
push eax
call sub.kernel32.dll_ReadFile_1
movzx esi, byte [ebx + 0x560]
lea edx, [ebp - 0x20]
mov edi, dword [ebx + 0x36c]
mov eax, edi
call fcn.00462330
push dword [ebp - 0x20]
push 0x4be6a4
lea edx, [ebp - 0x24]
mov eax, esi
and eax, 0xf
call fcn.00409200
push dword [ebp - 0x24]
lea eax, [ebp - 0x1c]
mov edx, 3
call fcn.00404f18
mov edx, dword [ebp - 0x1c]
mov eax, edi
call fcn.00462360
lea edx, [ebp - 0x2c]
mov edi, dword [ebx + 0x364]
mov eax, edi
call fcn.00462330
push dword [ebp - 0x2c]
push 0x4be6a4
lea edx, [ebp - 0x30]
mov eax, esi
test eax, eax
jns 0x4be408
add eax, 0xf
sar eax, 4
and eax, 0xf
call fcn.00409200
push dword [ebp - 0x30]
lea eax, [ebp - 0x28]
mov edx, 3
call fcn.00404f18
mov edx, dword [ebp - 0x28]
mov eax, edi
call fcn.00462360
mov byte [ebx + 0x5c4], 0x80
push 0
lea eax, [ebx + 0x3974]
push eax
push 4
lea eax, [ebx + 0x5c4]
push eax
mov eax, dword [ebx + 0x3e0]
push eax
call sub.kernel32.dll_WriteFile_1
push 0
lea eax, [ebx + 0x3978]
push eax
push 4
lea eax, [ebx + 0x560]
push eax
mov eax, dword [ebx + 0x3e0]
push eax
call sub.kernel32.dll_ReadFile_1
movzx esi, byte [ebx + 0x560]
lea edx, [ebp - 0x38]
mov edi, dword [ebx + 0x36c]
mov eax, edi
call fcn.00462330
push dword [ebp - 0x38]
push 0x4be6a4
lea edx, [ebp - 0x3c]
mov eax, esi
and eax, 0xf
call fcn.00409200
push dword [ebp - 0x3c]
lea eax, [ebp - 0x34]
mov edx, 3
call fcn.00404f18
mov edx, dword [ebp - 0x34]
mov eax, edi
call fcn.00462360
lea edx, [ebp - 0x44]
mov edi, dword [ebx + 0x364]
mov eax, edi
call fcn.00462330
push dword [ebp - 0x44]
push 0x4be6a4
lea edx, [ebp - 0x48]
mov eax, esi
test eax, eax
jns 0x4be4da
add eax, 0xf
sar eax, 4
and eax, 0xf
call fcn.00409200
push dword [ebp - 0x48]
lea eax, [ebp - 0x40]
mov edx, 3
call fcn.00404f18
mov edx, dword [ebp - 0x40]
mov eax, edi
call fcn.00462360
push 0x7d0
call sub.kernel32.dll_Sleep_1
mov byte [ebx + 0x5c4], 0x55
push 0
lea eax, [ebx + 0x3974]
push eax
push 4
lea eax, [ebx + 0x5c4]
push eax
mov eax, dword [ebx + 0x3e0]
push eax
call sub.kernel32.dll_WriteFile_1
push 0
lea eax, [ebx + 0x3978]
push eax
push 4
lea eax, [ebx + 0x560]
push eax
mov eax, dword [ebx + 0x3e0]
push eax
call sub.kernel32.dll_ReadFile_1
mov al, byte [ebx + 0x560]
and al, 7
mov esi, eax
and esi, 0xff
lea edx, [ebp - 0x4c]
mov eax, esi
and eax, 0xf
call fcn.00409200
mov edx, dword [ebp - 0x4c]
mov eax, dword [ebx + 0x36c]
call fcn.00462360
lea edx, [ebp - 0x50]
mov eax, esi
test eax, eax
jns 0x4be583
add eax, 0xf
sar eax, 4
and eax, 0xf
call fcn.00409200
mov edx, dword [ebp - 0x50]
mov eax, dword [ebx + 0x364]
call fcn.00462360
cmp esi, 7
je 0x4be5d9
mov eax, dword [0x4d5d70]
mov byte [eax + 0x39c2], 1
mov eax, dword [ebx + 0x39ac]
cmp eax, 0x16
je 0x4be5fa
cmp eax, 8
je 0x4be5fa
cmp eax, 0xa
je 0x4be5fa
mov eax, dword [0x4d5d70]
mov eax, dword [eax + 0x3c4]
mov edx, 0x4be6b0
call fcn.00462360
jmp 0x4be5fa
mov eax, dword [0x4d5d70]
mov byte [eax + 0x39c2], 0
mov eax, dword [0x4d5d70]
mov eax, dword [eax + 0x3c4]
mov edx, 0x4be6c0
call fcn.00462360
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4be695
lea eax, [ebp - 0x50]
mov edx, 3
call fcn.00404bbc
lea eax, [ebp - 0x44]
mov edx, 2
call fcn.00404bbc
lea eax, [ebp - 0x3c]
call fcn.00404b98
lea eax, [ebp - 0x38]
mov edx, 2
call fcn.00404bbc
lea eax, [ebp - 0x30]
call fcn.00404b98
lea eax, [ebp - 0x2c]
mov edx, 2
call fcn.00404bbc
lea eax, [ebp - 0x24]
call fcn.00404b98
lea eax, [ebp - 0x20]
mov edx, 2
call fcn.00404bbc
lea eax, [ebp - 0x18]
call fcn.00404b98
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.00404bbc
lea eax, [ebp - 0xc]
call fcn.00404b98
lea eax, [ebp - 8]
mov edx, 2
call fcn.00404bbc
ret