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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9c
cmp dword [ebp + 8], 0
je 0x480312
mov eax, dword [ebp + 0x28]
and eax, 0xffff
cdq
and edx, 0x1ff
add eax, edx
sar eax, 9
mov word [ebp - 0x2c], ax
push 0x1f
push 0
lea eax, [ebp - 0x28]
push eax
call fcn.004e9480
add esp, 0xc
push 0xd
push 0
lea ecx, [ebp - 0x3c]
push ecx
call fcn.004e9480
add esp, 0xc
mov byte [ebp - 0x28], 0x55
mov byte [ebp - 0x27], 0x53
mov byte [ebp - 0x26], 0x42
mov byte [ebp - 0x25], 0x43
mov byte [ebp - 0x24], 1
mov byte [ebp - 0x23], 2
mov byte [ebp - 0x22], 3
mov byte [ebp - 0x21], 4
mov edx, dword [ebp + 0x28]
and edx, 0xff
mov byte [ebp - 0x20], dl
mov eax, dword [ebp + 0x28]
shr eax, 8
and eax, 0xff
mov byte [ebp - 0x1f], al
mov ecx, dword [ebp + 0x28]
shr ecx, 0x10
and ecx, 0xff
mov byte [ebp - 0x1e], cl
mov edx, dword [ebp + 0x28]
shr edx, 0x18
and edx, 0xff
mov byte [ebp - 0x1d], dl
mov byte [ebp - 0x1a], 0x10
mov dword [ebp - 4], 0
jmp 0x480263
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0x10
jge 0x48027a
mov ecx, dword [ebp + 0x2c]
add ecx, dword [ebp - 4]
mov edx, dword [ebp - 4]
mov al, byte [ecx]
mov byte [ebp + edx - 0x19], al
jmp 0x48025a
push 0
lea ecx, [ebp - 8]
push ecx
push 0x1f
lea edx, [ebp - 0x28]
push edx
mov eax, dword [ebp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jne 0x4802a0
xor eax, eax
jmp 0x480414
cmp dword [ebp + 0x28], 0
je 0x4802ce
push 0
lea ecx, [ebp - 8]
push ecx
mov edx, dword [ebp + 0x28]
push edx
mov eax, dword [ebp + 0x24]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jne 0x4802ce
xor eax, eax
jmp 0x480414
push 0
lea edx, [ebp - 8]
push edx
push 0xd
lea eax, [ebp - 0x3c]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jne 0x4802f4
xor eax, eax
jmp 0x480414
mov edx, dword [ebp - 0x30]
and edx, 0xff
test edx, edx
je 0x480308
xor eax, eax
jmp 0x480414
mov eax, 1
jmp 0x480414
push 0x50
push 0
lea eax, [ebp - 0x90]
push eax
call fcn.004e9480
add esp, 0xc
mov word [ebp - 0x90], 0x2c
mov byte [ebp - 0x8d], 0
mov byte [ebp - 0x8c], 1
mov byte [ebp - 0x8b], 0
mov byte [ebp - 0x8a], 0x10
mov byte [ebp - 0x89], 0
mov byte [ebp - 0x88], 0
mov ecx, dword [ebp + 0x28]
mov dword [ebp - 0x84], ecx
mov dword [ebp - 0x80], 0x12c
mov edx, dword [ebp + 0x24]
mov dword [ebp - 0x7c], edx
mov dword [ebp - 0x78], 0x30
mov dword [ebp - 4], 0
jmp 0x480387
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0x10
jge 0x48039e
mov ecx, dword [ebp + 0x2c]
add ecx, dword [ebp - 4]
mov edx, dword [ebp - 4]
mov al, byte [ecx]
mov byte [ebp + edx - 0x74], al
jmp 0x48037e
mov dword [ebp - 0x98], 0x50
mov dword [ebp - 0x94], 0
cmp dword [ebp + 0x20], 0xffffffff
je 0x480412
push 0
lea ecx, [ebp - 0x94]
push ecx
mov edx, dword [ebp - 0x98]
push edx
lea eax, [ebp - 0x90]
push eax
mov ecx, dword [ebp - 0x98]
push ecx
lea edx, [ebp - 0x90]
push edx
push 0x4d014
mov eax, dword [ebp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [ebp - 0x9c], eax
cmp dword [ebp - 0x9c], 0
je 0x480412
mov ecx, dword [ebp - 0x8e]
and ecx, 0xff
test ecx, ecx
jne 0x480412
mov eax, 1
jmp 0x480414
xor eax, eax
mov esp, ebp
pop ebp
ret