Function at 0x42da01
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, dword [eax]
mov eax, dword [ebp + 0x10]
or ebx, 0xffffffff
mov esi, dword [eax]
mov dword [ebp - 0xc], ebx
mov ecx, dword [edi + 4]
test ecx, ecx
mov dword [ebp - 0x10], ecx
jle 0x42dac4
mov eax, dword [edi]
push ecx
push dword [ebp + 0xc]
mov dword [ebp - 0x14], eax
push eax
call dword [sym.imp.MSVCRT.dll_memchr]
and dword [ebp - 8], 0
add esp, 0xc
xor ecx, ecx
cmp ebx, 0xffffffff
setne cl
test eax, eax
mov dword [ebp - 0x18], eax
mov ebx, ecx
je 0x42da59
sub eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x10], eax
jmp 0x42da5c
mov eax, dword [ebp - 0x10]
add ebx, eax
cmp esi, 4
je 0x42da76
mov eax, dword [esi + 8]
add ebx, eax
mov dword [ebp - 8], eax
push ebx
push esi
call sym.ruby187g.exc_rb_str_resize
pop ecx
pop ecx
jmp 0x42da8e
push ebx
call sym.ruby187g.exc_rb_str_buf_new
mov esi, eax
mov eax, dword [ebp + 0x10]
pop ecx
mov dword [eax], esi
mov eax, dword [esi + 0xc]
mov dword [esi + 8], ebx
and byte [eax + ebx], 0
mov eax, dword [ebp - 0xc]
cmp eax, 0xffffffff
je 0x42daa2
mov ecx, dword [esi + 0xc]
mov edx, dword [ebp - 8]
inc dword [ebp - 8]
mov byte [ecx + edx], al
mov eax, dword [esi + 0xc]
push edi
push dword [ebp - 0x10]
add eax, dword [ebp - 8]
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp dword [ebp - 0x18], 0
jne 0x42dbd2
jmp 0x42dafd
cmp ebx, 0xffffffff
je 0x42dafd
cmp esi, 4
je 0x42dae2
lea eax, [ebp - 1]
push 1
push eax
push esi
mov byte [ebp - 1], bl
call sym.ruby187g.exc_rb_str_buf_cat
add esp, 0xc
jmp 0x42dafd
push 1
call sym.ruby187g.exc_rb_str_buf_new
mov esi, eax
mov eax, dword [ebp + 0x10]
pop ecx
mov dword [eax], esi
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 8]
mov byte [eax + ecx], bl
inc dword [esi + 8]
push edi
call dword [sym.imp.MSVCRT.dll__fileno]
push eax
call sym.ruby187g.exc_rb_thread_wait_fd
push dword [ebp + 8]
call sym.ruby187g.exc_rb_io_check_closed
push edi
call dword [sym.imp.MSVCRT.dll_clearerr]
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
add esp, 0x10
push 1
push sym.ruby187g.exc_rb_trap_immediate
call ebx
push edi
mov dword [ebp - 0x18], eax
call sym.ruby187g.exc_rb_w32_getc
pop ecx
mov dword [ebp - 0xc], eax
push dword [ebp - 0x18]
push sym.ruby187g.exc_rb_trap_immediate
call ebx
mov ebx, dword [sym.imp.MSVCRT.dll__errno]
call ebx
mov eax, dword [eax]
mov dword [ebp - 0x18], eax
xor eax, eax
cmp dword [sym.ruby187g.exc_rb_prohibit_interrupt], eax
jne 0x42db87
cmp dword [sym.ruby187g.exc_rb_thread_critical], eax
jne 0x42db87
cmp dword [sym.ruby187g.exc_rb_thread_pending], eax
jne 0x42db78
mov eax, dword [sym.ruby187g.exc_rb_thread_tick]
dec dword [sym.ruby187g.exc_rb_thread_tick]
test eax, eax
jg 0x42db87
mov dword [sym.ruby187g.exc_rb_thread_tick], 0x1f4
call sym.ruby187g.exc_rb_thread_schedule
cmp dword [sym.ruby187g.exc_rb_trap_pending], 0
je 0x42db95
call sym.ruby187g.exc_rb_trap_exec
call ebx
mov ebx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x18]
cmp ebx, 0xffffffff
mov dword [eax], ecx
jne 0x42dbc5
test byte [edi + 0xc], 0x20
je 0x42dc07
push edi
call dword [sym.imp.MSVCRT.dll_clearerr]
push edi
call dword [sym.imp.MSVCRT.dll__fileno]
push eax
call sym.ruby187g.exc_rb_io_wait_readable
add esp, 0xc
test eax, eax
je 0x42dbd7
cmp ebx, dword [ebp + 0xc]
je 0x42dbe2
mov ebx, dword [ebp - 0xc]
jmp 0x42da1a
mov eax, dword [ebp + 0xc]
jmp 0x42dc09
mov eax, dword [ebp + 8]
push dword [eax + 0x14]
call sym.ruby187g.exc_rb_sys_fail
lea eax, [ebp + 0xf]
cmp esi, 4
push 1
mov byte [ebp + 0xf], bl
push eax
je 0x42dbfb
push esi
call sym.ruby187g.exc_rb_str_cat
add esp, 0xc
jmp 0x42dc07
call sym.ruby187g.exc_rb_str_new
pop ecx
pop ecx
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret