Function at 0x4837dd
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 0x4839da
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.004e9480
add esp, 0xc
push 0xd
push 0
lea edx, [ebp - 0x3c]
push edx
call fcn.004e9480
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 0x48388c
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 0x4838a2
mov edx, dword [ebp - 0x28]
add edx, 1
mov dword [ebp - 0x28], edx
cmp dword [ebp - 0x28], 0x10
jge 0x4838b9
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 0x483899
cmp dword [ebp + 0x18], 0
je 0x4838e0
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 0x4838ff
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 0x48390c
xor eax, eax
jmp 0x483af9
cmp dword [ebp + 0x14], 0
je 0x483969
cmp dword [ebp + 0x18], 0
je 0x48393b
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 0x48395c
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 0x483969
xor eax, eax
jmp 0x483af9
cmp dword [ebp + 0x18], 0
je 0x483990
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 0x4839af
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 0x4839bc
xor eax, eax
jmp 0x483af9
mov edx, dword [ebp - 0x30]
and edx, 0xff
test edx, edx
je 0x4839d0
xor eax, eax
jmp 0x483af9
mov eax, 1
jmp 0x483af9
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], 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 0x483a58
mov eax, dword [ebp - 0x9c]
add eax, 1
mov dword [ebp - 0x9c], eax
cmp dword [ebp - 0x9c], 0x10
jge 0x483a78
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 0x483a49
mov dword [ebp - 0x98], 0x50
mov dword [ebp - 0x94], 0
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x232], 0xffffffff
je 0x483af7
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 0x483af7
mov eax, dword [ebp - 0x8e]
and eax, 0xff
test eax, eax
jne 0x483af7
mov eax, 1
jmp 0x483af9
xor eax, eax
mov esp, ebp
pop ebp
ret