Function at 0x4018f0
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x48afa0
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4b185c]
xor eax, esp
push eax
lea eax, [esp + 0x4c]
mov dword fs:[0], eax
mov ecx, dword [esp + 0x5c]
xor ebp, ebp
cmp dword [ecx + 0x2c], ebp
jne 0x401944
mov al, 1
mov ecx, dword [esp + 0x4c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret 4
mov ecx, dword [esp + 0x5c]
mov esi, dword [ecx + 0x28]
lea ebx, [ecx + 0x20]
cmp ebx, esi
je 0x4019a7
mov eax, dword [ebx]
cmp eax, ebp
je 0x401994
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x40198e
mov edi, dword [ebx]
cmp edi, ebp
je 0x40198e
mov eax, dword [edi + 4]
cmp eax, ebp
je 0x401975
push eax
call fcn.0046b365
add esp, 4
mov eax, dword [edi + 8]
cmp eax, ebp
je 0x401985
push eax
call fcn.0046b365
add esp, 4
push edi
call fcn.004553b4
add esp, 4
mov ecx, dword [esp + 0x5c]
mov dword [ebx], ebp
mov eax, dword [esi]
mov dword [ebx], eax
cmp eax, ebp
je 0x4019a7
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov ecx, dword [esp + 0x5c]
mov edi, dword [ecx + 0x2c]
mov ecx, dword [ecx + 0x28]
mov eax, 1
dec edi
call fcn.004086f0
mov esi, dword [esp + 0x5c]
cmp edi, ebp
je 0x4019d8
mov eax, dword [esi + 0x28]
lea ecx, [edi*4]
push ecx
lea edx, [eax + 4]
push edx
push eax
call fcn.0046e5b0
add esp, 0xc
dec dword [esi + 0x2c]
push 0x400
push ebp
mov dword [esp + 0x38], vtable.OCore::OStream.0
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x40], ebp
call fcn.0046df68
add esp, 8
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], 0x400
mov dword [esp + 0x54], ebp
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x40], ebp
mov dword [esp + 0x54], 1
mov dword [esp + 0x30], vtable.OFile.0
mov dword [esp + 0x44], ebp
mov dword [esp + 0x48], ebp
mov byte [esp + 0x54], 2
lea eax, [esp + 0x48]
cmp eax, ebx
je 0x401a91
mov eax, dword [esp + 0x48]
cmp eax, ebp
je 0x401a80
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x401a7c
mov eax, dword [esp + 0x48]
mov edi, eax
cmp eax, ebp
je 0x401a7c
mov eax, dword [eax + 4]
cmp eax, ebp
je 0x401a63
push eax
call fcn.0046b365
add esp, 4
mov eax, dword [edi + 8]
cmp eax, ebp
je 0x401a73
push eax
call fcn.0046b365
add esp, 4
push edi
call fcn.004553b4
add esp, 4
mov dword [esp + 0x48], ebp
mov eax, dword [ebx]
mov dword [esp + 0x48], eax
cmp eax, ebp
je 0x401ab1
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov eax, dword [esp + 0x48]
cmp eax, ebp
je 0x401ab1
mov ecx, dword [eax + 8]
cmp ecx, ebp
je 0x401aa5
cmp word [ecx], bp
jne 0x401ade
mov ecx, dword [eax + 4]
cmp ecx, ebp
je 0x401ab1
cmp byte [ecx], 0
jne 0x401ab8
mov eax, 0x49c3b0
jmp 0x401ae1
mov edi, eax
cmp dword [eax + 8], ebp
jne 0x401ad4
mov ecx, dword [eax + 0xc]
add ecx, ecx
push ecx
call fcn.0046b442
mov dword [edi + 8], eax
mov eax, dword [esp + 0x4c]
add esp, 4
push eax
call fcn.0040c910
mov eax, dword [esp + 0x48]
mov eax, dword [eax + 8]
push ebp
push 0x80
push 3
push ebp
push 1
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x44], eax
cmp eax, 0xffffffff
jne 0x401b05
mov dword [esp + 0x44], ebp
mov dword [esp + 0x54], 3
cmp dword [esp + 0x44], ebp
je 0x401bf9
mov edx, dword [esp + 0x30]
mov eax, dword [edx + 0xc]
lea ecx, [esp + 0x30]
call eax
mov ecx, dword [esp + 0x44]
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 2
push ebp
push 0xffffffffffffffea
push ecx
call ebx
mov eax, dword [esp + 0x44]
cmp eax, ebp
je 0x401bda
push ebp
lea edx, [esp + 0x18]
push edx
push 0x16
lea ecx, [esp + 0x24]
push ecx
push eax
mov dword [esp + 0x28], ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401bda
cmp dword [esp + 0x14], 0x16
jne 0x401bda
cmp dword [esp + 0x18], 0x6054b50
jne 0x401bda
mov edi, dword [esp + 0x28]
cmp dword [esp + 0x44], ebp
je 0x401b90
mov edx, dword [esp + 0x30]
mov eax, dword [edx + 0xc]
lea ecx, [esp + 0x30]
call eax
mov ecx, dword [esp + 0x44]
push ebp
push ebp
push edi
push ecx
call ebx
xor edx, edx
xor ebx, ebx
cmp dx, word [esp + 0x22]
jae 0x401bda
jmp 0x401ba0
lea eax, [esp + 0x30]
push eax
call fcn.00401c20
mov dword [esp + 0x14], eax
cmp eax, ebp
je 0x401bf9
mov ebp, dword [esi + 0xc]
add esi, 4
lea edi, [ebp + 1]
call fcn.00402150
mov esi, dword [esi + 4]
mov ecx, dword [esp + 0x14]
mov dword [esi + ebp*4], ecx
movzx edx, word [esp + 0x22]
mov esi, dword [esp + 0x5c]
inc ebx
xor ebp, ebp
cmp ebx, edx
jl 0x401ba0
mov dword [esp + 0x54], 0xffffffff
lea ecx, [esp + 0x30]
call fcn.004056d0
cmp dword [esi + 0x2c], ebp
jne 0x401940
jmp 0x401922
mov dword [esp + 0x54], 0xffffffff
lea ecx, [esp + 0x30]
call fcn.004056d0
xor al, al
jmp 0x401924