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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa0
mov eax, dword [ebp + 8]
cmp dword [eax + 0x58], 0
je 0x48299a
mov eax, dword [ebp + 0x14]
cdq
and edx, 0x1ff
add eax, edx
sar eax, 9
mov word [ebp - 0x2c], ax
push 0x1f
push 0
lea ecx, [ebp - 0x24]
push ecx
call fcn.004e8440
add esp, 0xc
push 0xd
push 0
lea edx, [ebp - 0x3c]
push edx
call fcn.004e8440
add esp, 0xc
mov byte [ebp - 0x24], 0x55
mov byte [ebp - 0x23], 0x53
mov byte [ebp - 0x22], 0x42
mov byte [ebp - 0x21], 0x43
mov eax, dword [ebp + 0x14]
and eax, 0xff
mov byte [ebp - 0x1c], al
mov ecx, dword [ebp + 0x14]
sar ecx, 8
and ecx, 0xff
mov byte [ebp - 0x1b], cl
mov edx, dword [ebp + 0x14]
sar edx, 0x10
and edx, 0xff
mov byte [ebp - 0x1a], dl
mov eax, dword [ebp + 0x14]
sar eax, 0x18
and eax, 0xff
mov byte [ebp - 0x19], al
mov byte [ebp - 0x18], 0x80
mov ecx, dword [ebp + 0xc]
xor edx, edx
mov dl, byte [ecx]
cmp edx, 0xd3
jne 0x48284c
mov eax, dword [ebp + 8]
mov cl, byte [eax + 0xc64]
mov byte [ebp - 0x17], cl
mov byte [ebp - 0x16], 0x10
mov dword [ebp - 0x28], 0
jmp 0x482862
mov edx, dword [ebp - 0x28]
add edx, 1
mov dword [ebp - 0x28], edx
cmp dword [ebp - 0x28], 0x10
jge 0x482879
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x28]
mov dl, byte [eax]
mov byte [ebp + ecx - 0x15], dl
jmp 0x482859
cmp dword [ebp + 0x18], 0
je 0x4828a0
push 0
lea eax, [ebp - 4]
push eax
push 0x1f
lea ecx, [ebp - 0x24]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x22e]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x40], eax
jmp 0x4828bf
push 0
lea ecx, [ebp - 4]
push ecx
push 0x1f
lea edx, [ebp - 0x24]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x226]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jne 0x4828cc
xor eax, eax
jmp 0x482ab9
cmp dword [ebp + 0x14], 0
je 0x482929
cmp dword [ebp + 0x18], 0
je 0x4828fb
push 0
lea edx, [ebp - 4]
push edx
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x22a]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x40], eax
jmp 0x48291c
push 0
lea ecx, [ebp - 4]
push ecx
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x222]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jne 0x482929
xor eax, eax
jmp 0x482ab9
cmp dword [ebp + 0x18], 0
je 0x482950
push 0
lea eax, [ebp - 4]
push eax
push 0xd
lea ecx, [ebp - 0x3c]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x22a]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x40], eax
jmp 0x48296f
push 0
lea ecx, [ebp - 4]
push ecx
push 0xd
lea edx, [ebp - 0x3c]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x222]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jne 0x48297c
xor eax, eax
jmp 0x482ab9
mov edx, dword [ebp - 0x30]
and edx, 0xff
test edx, edx
je 0x482990
xor eax, eax
jmp 0x482ab9
mov eax, 1
jmp 0x482ab9
push 0x50
push 0
lea eax, [ebp - 0x90]
push eax
call fcn.004e8440
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], 1
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x84], ecx
mov dword [ebp - 0x80], 5
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x7c], edx
mov dword [ebp - 0x78], 0x30
mov dword [ebp - 0x9c], 0
jmp 0x482a18
mov eax, dword [ebp - 0x9c]
add eax, 1
mov dword [ebp - 0x9c], eax
cmp dword [ebp - 0x9c], 0x10
jge 0x482a38
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0x9c]
mov edx, dword [ebp - 0x9c]
mov al, byte [ecx]
mov byte [ebp + edx - 0x74], al
jmp 0x482a09
mov dword [ebp - 0x98], 0x50
mov dword [ebp - 0x94], 0
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x232], 0xffffffff
je 0x482ab7
push 0
lea edx, [ebp - 0x94]
push edx
mov eax, dword [ebp - 0x98]
push eax
lea ecx, [ebp - 0x90]
push ecx
mov edx, dword [ebp - 0x98]
push edx
lea eax, [ebp - 0x90]
push eax
push 0x4d014
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x232]
push edx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [ebp - 0xa0], eax
cmp dword [ebp - 0xa0], 0
je 0x482ab7
mov eax, dword [ebp - 0x8e]
and eax, 0xff
test eax, eax
jne 0x482ab7
mov eax, 1
jmp 0x482ab9
xor eax, eax
mov esp, ebp
pop ebp
ret