Function at 0x586390
Capabilities:
Check if file exists
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x5a9a4e
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x615370]
xor eax, esp
mov dword [esp + 0x2c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x615370]
xor eax, esp
push eax
lea eax, [esp + 0x44]
mov dword fs:[0], eax
mov esi, dword [esp + 0x58]
mov eax, dword [esp + 0x60]
mov edi, dword [esp + 0x54]
push esi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
xor ebx, ebx
test eax, eax
jne 0x5863ef
push esi
push ebx
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
mov ecx, dword [0x621100]
push str.CreateObject
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esp + 0x24], eax
cmp eax, ebx
je 0x58658b
mov dword [esp + 0x14], ebx
push ebx
push 0x80
push 3
push ebx
push 1
xor eax, eax
push SysReAllocStringLen
push edi
mov dword [esp + 0x68], ebx
mov dword [esp + 0x54], eax
mov word [esp + 0x58], ax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
or ebp, 0xffffffff
cmp esi, ebp
je 0x586512
push ebx
lea edx, [esp + 0x24]
push edx
push 6
lea eax, [esp + 0x44]
push eax
push esi
mov dword [esp + 0x34], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x20], 6
jne 0x5864ac
mov al, byte [esp + 0x38]
cmp al, 0x37
jne 0x5864c7
cmp byte [esp + 0x39], 0x7a
jne 0x5864ac
cmp byte [esp + 0x3a], 0xbc
jne 0x5864ac
cmp byte [esp + 0x3b], 0xaf
jne 0x5864ac
cmp byte [esp + 0x3c], 0x27
jne 0x5864ac
cmp byte [esp + 0x3d], 0x1c
jne 0x5864ac
lea eax, [esp + 0x14]
push eax
push 0x5c6f30
push 0x5c6f50
call dword [esp + 0x30]
test eax, eax
je 0x586512
mov eax, dword [esp + 0x14]
mov dword [esp + 0x4c], ebp
cmp eax, ebx
je 0x5864c0
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, ebp
jmp 0x5867a8
cmp al, 0x50
jne 0x5864ac
cmp byte [esp + 0x39], 0x4b
jne 0x5864ac
cmp byte [esp + 0x3a], 3
jne 0x5864ac
cmp byte [esp + 0x3b], 4
jne 0x5864ac
lea eax, [esp + 0x14]
push eax
push 0x5c6f30
push 0x5c6f60
call dword [esp + 0x30]
test eax, eax
je 0x586512
mov eax, dword [esp + 0x14]
mov dword [esp + 0x4c], ebp
cmp eax, ebx
je 0x5864c0
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, ebp
jmp 0x5867a8
push 0x10
call fcn.005851c0
add esp, 4
cmp eax, ebx
je 0x58653e
mov dword [eax + 4], vtable.IStreamGetSize.0
mov dword [eax + 8], ebx
mov dword [eax], vtable.CInFileStream.1.0
mov dword [eax + 4], vtable.CInFileStream.0
mov dword [eax + 0xc], ebp
mov ebp, eax
jmp 0x586540
xor ebp, ebp
mov dword [esp + 0x24], ebp
cmp ebp, ebx
je 0x586551
mov eax, dword [ebp]
mov ecx, dword [eax + 4]
push ebp
call ecx
push edi
mov ecx, ebp
mov byte [esp + 0x50], 1
call fcn.00587120
test al, al
jne 0x586593
mov byte [esp + 0x4c], bl
cmp ebp, ebx
je 0x586573
mov edx, dword [ebp]
mov eax, dword [edx + 8]
push ebp
call eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x4c], 0xffffffff
cmp eax, ebx
je 0x58658b
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
or eax, 0xffffffff
jmp 0x5867a8
push 0x1c
call fcn.005851c0
add esp, 4
mov dword [esp + 0x20], eax
mov byte [esp + 0x4c], 2
cmp eax, ebx
je 0x5865b5
mov ecx, eax
call fcn.005859f0
mov edi, eax
jmp 0x5865b7
xor edi, edi
mov byte [esp + 0x4c], 1
mov dword [esp + 0x20], edi
cmp edi, ebx
je 0x5865cc
mov eax, dword [edi]
mov ecx, dword [eax + 4]
push edi
call ecx
push edi
mov byte [edi + 0xc], bl
mov eax, dword [esp + 0x18]
mov edx, dword [eax]
push ebx
push ebp
push eax
mov eax, dword [edx + 0xc]
mov byte [esp + 0x5c], 3
call eax
test eax, eax
je 0x586625
mov ecx, dword [edi]
mov edx, dword [ecx + 8]
push edi
mov byte [esp + 0x50], 1
call edx
mov byte [esp + 0x4c], bl
cmp ebp, ebx
je 0x586605
mov eax, dword [ebp]
mov ecx, dword [eax + 8]
push ebp
call ecx
mov eax, dword [esp + 0x14]
mov dword [esp + 0x4c], 0xffffffff
cmp eax, ebx
je 0x58661d
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
or eax, 0xffffffff
jmp 0x5867a8
push 0x90
call fcn.005851c0
add esp, 4
mov dword [esp + 0x38], eax
mov byte [esp + 0x4c], 4
cmp eax, ebx
je 0x58664a
mov ecx, eax
call fcn.00585a50
mov esi, eax
jmp 0x58664c
xor esi, esi
mov byte [esp + 0x4c], 3
mov dword [esp + 0x38], esi
cmp esi, ebx
je 0x586661
mov ecx, dword [esi]
mov edx, dword [ecx + 4]
push esi
call edx
mov eax, dword [esp + 0x1c]
push eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x50], 5
call fcn.005856c0
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x5c]
push ecx
mov ecx, dword [esp + 0x18]
push edx
lea eax, [esp + 0x34]
push eax
push ecx
mov ecx, esi
mov byte [esp + 0x5c], 6
call fcn.00585c40
mov edx, dword [esp + 0x2c]
push edx
mov byte [esp + 0x50], 5
call fcn.005851f0
mov eax, dword [esp + 0x1c]
add esp, 4
mov byte [esi + 0x58], bl
cmp eax, ebx
je 0x5866c2
mov edx, dword [esp + 0x1c]
mov ecx, dword [eax]
push edx
mov edx, dword [esp + 0x2c]
push edx
push eax
mov eax, dword [ecx]
call eax
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x1c]
push esi
push ebx
push 0xffffffffffffffff
push ebx
push eax
call edx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x586717
mov edx, dword [esp + 0x5c]
fld qword [0x5e79d8]
mov ecx, dword [eax]
push edx
sub esp, 8
fstp qword [esp]
push eax
mov eax, dword [ecx + 0xc]
call eax
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx]
mov eax, dword [esp + 0x5c]
xor ecx, ecx
cmp dword [esp + 0x1c], ebx
push eax
mov eax, dword [esp + 0x1c]
sete cl
push ecx
mov ecx, dword [edx + 0x10]
push eax
call ecx
mov byte [esp + 0x4c], 3
push esi
cmp dword [esp + 0x20], ebx
je 0x586769
mov edx, dword [esi]
mov eax, dword [edx + 8]
call eax
mov ecx, dword [edi]
mov edx, dword [ecx + 8]
push edi
mov byte [esp + 0x50], 1
call edx
mov byte [esp + 0x4c], bl
cmp ebp, ebx
je 0x586748
mov eax, dword [ebp]
mov ecx, dword [eax + 8]
push ebp
call ecx
mov eax, dword [esp + 0x14]
mov dword [esp + 0x4c], 0xffffffff
cmp eax, ebx
je 0x58661d
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
or eax, 0xffffffff
jmp 0x5867a8
mov ecx, dword [esi]
mov edx, dword [ecx + 8]
call edx
mov eax, dword [edi]
mov ecx, dword [eax + 8]
push edi
mov byte [esp + 0x50], 1
call ecx
mov byte [esp + 0x4c], bl
cmp ebp, ebx
je 0x58678e
mov edx, dword [ebp]
mov eax, dword [edx + 8]
push ebp
call eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x4c], 0xffffffff
cmp eax, ebx
je 0x5867a6
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
xor eax, eax
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.005886fc
add esp, 0x3c
ret