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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov esi, ecx
mov ebx, edx
mov byte [ebp - 1], al
mov edi, dword [ebp + 0x14]
cmp dword [ebx + 0xcc0], 0xd
jne 0x4848b5
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp + 8]
push eax
mov ecx, edi
mov edx, dword [ebx + 4]
movzx eax, byte [ebp - 1]
call fcn.0046cc64
cmp eax, 0xaa
je 0x4848aa
cmp byte [ebp - 1], 3
jne 0x484b7b
cmp eax, 3
jne 0x484b7b
mov edx, dword [ebp + 8]
mov byte [edx], 0
jmp 0x484b7b
cmp byte [ebx + 9], 0
je 0x4848c9
mov eax, dword [ebx + 4]
call fcn.0046da40
mov dword [ebx + 0xcd0], eax
test esi, esi
je 0x4848d6
mov eax, dword [ebx + 0xce4]
mov dword [esi + 0x10], eax
mov eax, dword [ebx + 0xcc0]
sub eax, 0xc
je 0x4848e8
sub eax, 2
je 0x484922
jmp 0x48495f
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push edi
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp + 8]
push eax
push esi
mov eax, dword [ebx + 0x54]
push eax
lea eax, [ebx + 0xe64]
push eax
movzx ecx, byte [ebx + 0xe20]
mov edx, dword [ebx + 0xcd0]
movzx eax, byte [ebp - 1]
call fcn.00474140
jmp 0x484aba
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push edi
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp + 8]
push eax
push esi
mov eax, dword [ebx + 0x54]
push eax
lea eax, [ebx + 0xe58]
push eax
test byte [ebx + 0xcc8], 4
setne dl
mov ecx, dword [ebx + 0xcd0]
movzx eax, byte [ebp - 1]
call fcn.00474290
jmp 0x484aba
test esi, esi
je 0x48498a
lea edi, [esi + 8]
mov eax, dword [ebx + 0x1c]
xor edx, edx
push edx
push eax
mov eax, dword [ebp + 0x18]
mov edx, dword [ebp + 0x1c]
call fcn.00405158
mov dword [edi], eax
mov dword [edi + 4], edx
xor eax, eax
mov dword [esi], eax
xor eax, eax
mov dword [esi + 4], eax
xor eax, eax
jmp 0x4849c7
mov eax, dword [ebx + 0x1c]
xor edx, edx
push edx
push eax
mov eax, dword [ebp + 0x18]
mov edx, dword [ebp + 0x1c]
call fcn.00405158
push edx
push eax
xor edx, edx
mov eax, dword [ebx + 0xcd0]
call fcn.00415f74
cmp edx, 0xffffffff
jne 0x4849c5
cmp eax, 0xffffffff
jne 0x4849c5
call sub.kernel32.dll_GetLastError
test eax, eax
jne 0x4849c7
mov eax, 0xfffffff8
jmp 0x4849c7
xor eax, eax
test eax, eax
jne 0x484aba
cmp byte [ebp - 1], 2
jne 0x484a1e
push esi
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebx + 0xcd0]
push eax
call sub.kernel32.dll_ReadFile
test eax, eax
jne 0x484a02
call sub.kernel32.dll_GetLastError
test eax, eax
jne 0x484a72
mov eax, 0xfffffff8
jmp 0x484a72
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 0x10]
jae 0x484a1a
call sub.kernel32.dll_GetLastError
test eax, eax
jne 0x484a72
mov eax, 0xffffffef
jmp 0x484a72
xor eax, eax
jmp 0x484a72
cmp byte [ebp - 1], 3
jne 0x484a6d
push esi
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebx + 0xcd0]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
jne 0x484a51
call sub.kernel32.dll_GetLastError
test eax, eax
jne 0x484a72
mov eax, 0xfffffff8
jmp 0x484a72
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 0x10]
jae 0x484a69
call sub.kernel32.dll_GetLastError
test eax, eax
jne 0x484a72
mov eax, 0xfffffff0
jmp 0x484a72
xor eax, eax
jmp 0x484a72
mov eax, 0xffff8100
test esi, esi
je 0x484aba
cmp eax, 0x3e5
jne 0x484aba
mov eax, dword [ebx + 0x58]
push eax
mov eax, dword [esi + 0x10]
push eax
call sub.kernel32.dll_WaitForSingleObject
test eax, eax
push 0
lea eax, [ebp - 8]
push eax
push esi
mov eax, dword [ebx + 0xcd0]
push eax
call sub.kernel32.dll_GetOverlappedResult
test eax, eax
je 0x484aa7
xor eax, eax
jmp 0x484aba
call sub.kernel32.dll_GetLastError
test eax, eax
jne 0x484ab5
mov eax, 0xfffffff8
xor edx, edx
mov dword [ebp - 8], edx
test esi, esi
je 0x484af1
cmp eax, 0x3e5
je 0x484acc
cmp eax, 0x3e4
jne 0x484af1
push 0xffffffffffffffff
lea eax, [ebp - 8]
push eax
push esi
mov eax, dword [ebx + 0xcd0]
push eax
call sub.kernel32.dll_GetOverlappedResult
test eax, eax
je 0x484ae7
xor eax, eax
jmp 0x484af1
call sub.kernel32.dll_GetLastError
xor edx, edx
mov dword [ebp - 8], edx
test eax, eax
je 0x484b7b
cmp eax, 2
je 0x484b75
cmp eax, 3
je 0x484b75
cmp eax, 5
je 0x484b75
cmp eax, 6
je 0x484b75
cmp eax, 0xf
je 0x484b75
cmp eax, 0x15
je 0x484b75
cmp eax, 0x1f
je 0x484b75
cmp eax, 0x37
je 0x484b75
cmp eax, 0x6b
je 0x484b75
cmp eax, 0x6c
je 0x484b75
cmp eax, 0x3ee
je 0x484b75
cmp eax, 0x456
je 0x484b75
cmp eax, 0x457
je 0x484b75
cmp eax, 0x458
je 0x484b75
cmp eax, 0x45e
je 0x484b75
cmp eax, 0x45f
je 0x484b75
cmp eax, 0x48f
je 0x484b75
cmp eax, 0x651
je 0x484b75
cmp eax, 0x10df
je 0x484b75
cmp byte [ebp - 1], 3
jne 0x484b7b
cmp eax, 0x13
jne 0x484b7b
mov edx, dword [ebp + 8]
mov byte [edx], 0
pop edi
pop esi
pop ebx
pop ecx
pop ecx
pop ebp
ret 0x1c