Function at 0x46be40
Capabilities:
Read file on windows

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x484658
mov eax, dword fs:[0]
push eax
push ebx
mov eax, 0x2190
call fcn.0042c5a0
mov eax, dword [0x4a206c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ecx, dword [0x4b04c0]
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0xc]
mov dword [ebp - 0x2198], esi
test ecx, ecx
jne 0x46beb7
call fcn.00413740
test eax, eax
je 0x46bea8
xor ecx, ecx
jmp 0x46beb7
mov dword [0x4b04c0], 0x4b04c8
mov ecx, 0x4b04c8
sub esp, 8
lea edx, [ebp - 0x2150]
push 0
push esi
call fcn.0041a5f0
mov esi, eax
add esp, 0x10
mov dword [ebp - 0x21a0], esi
test esi, esi
jns 0x46bf04
mov ecx, esi
call fcn.00411e40
push eax
push dword [ebp - 0x2198]
push str.unable_to_open__s:__s_n
push 2
call fcn.00449f5a
add esp, 4
push eax
call fcn.00408050
add esp, 0x10
xor al, al
jmp 0x46c271
lea ecx, [ebp - 0x2150]
call fcn.0041a490
push 0x4937a0
push esi
call fcn.00453537
push eax
lea ecx, [ebp - 0x2018]
mov dword [ebp - 0x2194], eax
push 0x2000
mov eax, ecx
mov dword [ebp - 0x2190], ecx
push 1
push eax
mov dword [ebp - 0x218c], 0x2000
mov dword [ebp - 0x2188], 0
mov dword [ebp - 0x2184], ecx
mov dword [ebp - 0x2180], 0
mov byte [ebp - 0x2178], 0
mov dword [ebp - 0x217c], 0
call fcn.0044b9a6
mov edx, dword [ebp - 0x2190]
add esp, 0x18
mov dword [ebp - 0x2180], eax
mov dword [ebp - 0x2184], edx
lea ecx, [edx - 1]
add ecx, eax
mov dword [ebp - 0x2188], ecx
cmp eax, dword [ebp - 0x218c]
jae 0x46bfaa
mov byte [eax + edx], 0
inc dword [ebp - 0x2188]
mov byte [ebp - 0x2178], 1
mov eax, dword [edi + 0x18]
xorps xmm0, xmm0
mov dword [ebp - 0x2174], eax
movups xmmword [ebp - 0x2170], xmm0
mov dword [ebp - 0x2160], 0x100
mov dword [ebp - 4], 0
mov dword [ebp - 0x2154], edi
lea eax, [ebp - 0x2174]
mov dword [ebp - 0x215c], 0
mov dword [ebp - 0x2158], 0
mov dword [ebp - 0x219c], eax
lea eax, [ebp - 0x2194]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x2174]
call fcn.00408140
mov ecx, dword [ebp - 0x215c]
test ecx, ecx
jne 0x46c09d
mov ecx, dword [ebp - 0x2184]
mov al, byte [ecx]
test al, al
jne 0x46c039
mov eax, dword [ebp - 0x217c]
sub eax, dword [ebp - 0x2190]
add eax, ecx
mov ecx, 1
jmp 0x46c091
push edi
lea eax, [ebp - 0x2194]
push eax
lea ecx, [ebp - 0x2174]
call fcn.004082b0
mov ecx, dword [ebp - 0x215c]
test ecx, ecx
jne 0x46c09d
lea eax, [ebp - 0x2194]
push eax
lea ecx, [ebp - 0x2174]
call fcn.00408140
mov ecx, dword [ebp - 0x215c]
test ecx, ecx
jne 0x46c09d
mov edx, dword [ebp - 0x2184]
mov al, byte [edx]
test al, al
je 0x46c09d
mov eax, dword [ebp - 0x217c]
mov ecx, 2
sub eax, dword [ebp - 0x2190]
add eax, edx
mov dword [ebp - 0x2158], eax
mov dword [ebp - 0x215c], ecx
mov eax, dword [ebp - 0x216c]
mov dword [ebp - 0x2168], eax
mov eax, dword [ebp - 0x2158]
mov dword [edi + 0x30], ecx
mov dword [edi + 0x34], eax
test ecx, ecx
jne 0x46c0d5
mov esi, dword [edi + 0x24]
mov ecx, edi
add esi, 0xfffffff0
mov dword [edi + 0x24], esi
call fcn.00401140
movups xmm0, xmmword [esi]
xor eax, eax
movups xmmword [edi], xmm0
mov word [esi + 0xe], ax
lea ecx, [ebp - 0x2154]
call fcn.00405c00
mov dword [ebp - 4], 0xffffffff
push dword [ebp - 0x216c]
call fcn.00446c84
add esp, 4
push 1
push dword [ebp - 0x2170]
call fcn.0042b5b2
mov eax, dword [0x4b04c0]
add esp, 8
mov dword [ebp - 0x2154], eax
test eax, eax
jne 0x46c13d
call fcn.00413740
test eax, eax
je 0x46c129
mov dword [ebp - 0x2154], 0
jmp 0x46c13d
mov dword [0x4b04c0], 0x4b04c8
mov dword [ebp - 0x2154], 0x4b04c8
cmp byte [0x4b0374], 0
jne 0x46c1ad
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov esi, eax
test esi, esi
jne 0x46c16c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, str.CreateEvent
mov ecx, eax
call fcn.0041c6e0
mov ecx, esi
mov edx, 0x4b0378
xor eax, eax
lock cmpxchg dword [edx], ecx
mov dword [ebp - 0x219c], eax
test eax, eax
jne 0x46c198
call fcn.00413600
push esi
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov byte [0x4b0374], 1
jmp 0x46c1ad
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xffffffffffffffff
push dword [ebp - 0x219c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp - 0x2154]
push 0x40
mov dword [ebp - 0x2110], eax
lea eax, [ebp - 0x2058]
push 0
push eax
mov dword [ebp - 0x214c], 6
mov dword [ebp - 0x2130], 0
mov dword [ebp - 0x2064], 0
mov dword [ebp - 0x2114], 2
mov dword [ebp - 0x2108], 0
mov dword [ebp - 0x2104], 0
mov dword [ebp - 0x2100], 0
mov dword [ebp - 0x210c], 0
call fcn.00443980
mov eax, dword [ebp - 0x21a0]
add esp, 0xc
mov dword [ebp - 0x205c], eax
lea eax, [ebp - 0x2078]
push eax
call fcn.00419ad0
add esp, 4
lea ecx, [ebp - 0x2150]
call fcn.0041a490
mov ecx, dword [edi + 0x30]
test ecx, ecx
je 0x46c269
call fcn.00404c70
push eax
push dword [edi + 0x34]
push dword [ebp - 0x2198]
push str._s:_d:__s_n
call fcn.00408070
add esp, 0x10
xor al, al
jmp 0x46c271
cmp word [edi + 0xe], 3
sete al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0042b571
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 8