Function at 0x435e12
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 0x435ed5
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 0x435e6a
sub eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x10], eax
jmp 0x435e6d
mov eax, dword [ebp - 0x10]
add ebx, eax
cmp esi, 4
je 0x435e87
mov eax, dword [esi + 8]
add ebx, eax
mov dword [ebp - 8], eax
push ebx
push esi
call sym.ruby187c.exc_rb_str_resize
pop ecx
pop ecx
jmp 0x435e9f
push ebx
call sym.ruby187c.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 0x435eb3
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 0x435fe3
jmp 0x435f0e
cmp ebx, 0xffffffff
je 0x435f0e
cmp esi, 4
je 0x435ef3
lea eax, [ebp - 1]
push 1
push eax
push esi
mov byte [ebp - 1], bl
call sym.ruby187c.exc_rb_str_buf_cat
add esp, 0xc
jmp 0x435f0e
push 1
call sym.ruby187c.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.ruby187c.exc_rb_thread_wait_fd
push dword [ebp + 8]
call sym.ruby187c.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.ruby187c.exc_rb_trap_immediate
call ebx
push edi
mov dword [ebp - 0x18], eax
call sym.ruby187c.exc_rb_w32_getc
pop ecx
mov dword [ebp - 0xc], eax
push dword [ebp - 0x18]
push sym.ruby187c.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.ruby187c.exc_rb_prohibit_interrupt], eax
jne 0x435f98
cmp dword [sym.ruby187c.exc_rb_thread_critical], eax
jne 0x435f98
cmp dword [sym.ruby187c.exc_rb_thread_pending], eax
jne 0x435f89
mov eax, dword [sym.ruby187c.exc_rb_thread_tick]
dec dword [sym.ruby187c.exc_rb_thread_tick]
test eax, eax
jg 0x435f98
mov dword [sym.ruby187c.exc_rb_thread_tick], 0x1f4
call sym.ruby187c.exc_rb_thread_schedule
cmp dword [sym.ruby187c.exc_rb_trap_pending], 0
je 0x435fa6
call sym.ruby187c.exc_rb_trap_exec
call ebx
mov ebx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x18]
cmp ebx, 0xffffffff
mov dword [eax], ecx
jne 0x435fd6
test byte [edi + 0xc], 0x20
je 0x436018
push edi
call dword [sym.imp.MSVCRT.dll_clearerr]
push edi
call dword [sym.imp.MSVCRT.dll__fileno]
push eax
call sym.ruby187c.exc_rb_io_wait_readable
add esp, 0xc
test eax, eax
je 0x435fe8
cmp ebx, dword [ebp + 0xc]
je 0x435ff3
mov ebx, dword [ebp - 0xc]
jmp 0x435e2b
mov eax, dword [ebp + 0xc]
jmp 0x43601a
mov eax, dword [ebp + 8]
push dword [eax + 0x14]
call sym.ruby187c.exc_rb_sys_fail
lea eax, [ebp + 0xf]
cmp esi, 4
push 1
mov byte [ebp + 0xf], bl
push eax
je 0x43600c
push esi
call sym.ruby187c.exc_rb_str_cat
add esp, 0xc
jmp 0x436018
call sym.ruby187c.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