Function at 0x485ce0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x438
mov eax, dword [0x522638]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.ole32.dll_CoCreateInstance]
push esi
push edi
mov dword [ebp - 0x438], ecx
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x434], ecx
lea ecx, [ebp - 0x408]
push ecx
xor edi, edi
push 0x503e68
push 4
mov dword [ebp - 0x42c], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x420], edx
mov edx, dword [ebp + 0x14]
push edi
push eax
mov dword [ebp - 0x430], edx
mov dword [ebp - 0x418], edi
mov dword [ebp - 0x408], edi
mov dword [ebp - 0x424], edi
mov dword [ebp - 0x41c], edi
mov dword [ebp - 0x428], edi
mov dword [ebp - 0x40c], 0xffffffff
mov dword [ebp - 0x414], edi
call ebx
mov esi, eax
cmp esi, edi
jl 0x486072
cmp dword [ebp - 0x408], edi
jne 0x485d8a
mov ebx, dword [ebp - 0x40c]
mov esi, 0x80004005
jmp 0x48608a
lea edx, [ebp - 0x418]
push edx
push 0x50cba0
push 1
push edi
push 0x4e8270
call ebx
mov esi, eax
cmp esi, edi
jl 0x486072
mov eax, dword [ebp - 0x418]
cmp eax, edi
je 0x48606d
mov ecx, dword [eax]
lea edx, [ebp - 0x41c]
push edx
mov edx, dword [ebp - 0x408]
push 0x503e68
push edx
push eax
mov eax, dword [ecx + 0xc]
call eax
mov esi, eax
cmp esi, edi
jl 0x486072
cmp dword [ebp - 0x41c], edi
je 0x48606d
mov eax, dword [ebp - 0x408]
mov ecx, dword [eax]
lea edx, [ebp - 0x424]
push edx
push 0x503f08
push eax
mov eax, dword [ecx]
call eax
test eax, eax
js 0x485f80
cmp dword [ebp - 0x424], edi
je 0x485f80
lea ecx, [ebp - 0x414]
push ecx
push 1
push edi
mov dword [ebp - 0x410], edi
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
mov esi, eax
cmp esi, edi
jl 0x486072
cmp dword [ebp - 0x414], edi
je 0x48606d
mov ecx, dword [ebp - 0x420]
push edi
push 0x80
push 3
push edi
push edi
push 0x80000000
call fcn.0041fc50
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x485f76
push edi
lea edx, [ebp - 0x410]
push edx
push 0x400
lea eax, [ebp - 0x404]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x485f76
mov ecx, dword [ebp - 0x410]
cmp ecx, edi
jbe 0x485ef0
jmp 0x485ea0
mov eax, dword [ebp - 0x414]
lea esi, [ebp - 0x420]
push esi
push ecx
lea ecx, [ebp - 0x404]
mov dword [ebp - 0x420], edi
mov edx, dword [eax]
mov edx, dword [edx + 0x10]
push ecx
push eax
call edx
push edi
lea eax, [ebp - 0x410]
push eax
push 0x400
lea ecx, [ebp - 0x404]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x485f76
mov ecx, dword [ebp - 0x410]
cmp ecx, edi
ja 0x485ea0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x424]
mov ecx, dword [ebp - 0x414]
mov edx, dword [eax]
mov edx, dword [edx + 0xc]
push edi
push ecx
push eax
mov dword [ebp - 0x40c], 0xffffffff
call edx
mov esi, eax
mov eax, dword [ebp - 0x424]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
cmp esi, edi
jl 0x486072
mov eax, dword [ebp - 0x418]
mov ecx, dword [eax]
lea edx, [ebp - 0x428]
push edx
mov edx, dword [ebp - 0x414]
push 0x503e48
push edx
push eax
mov eax, dword [ecx + 0xc]
call eax
mov esi, eax
cmp esi, edi
jl 0x486072
cmp dword [ebp - 0x428], edi
je 0x48606d
mov eax, dword [ebp - 0x414]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
jmp 0x485fe4
mov esi, 0x80004005
jmp 0x486078
mov eax, dword [ebp - 0x408]
lea edx, [ebp - 0x410]
push edx
mov dword [ebp - 0x410], edi
mov ecx, dword [eax]
push 0x503ef8
push eax
mov eax, dword [ecx]
call eax
mov esi, eax
cmp esi, edi
jl 0x486072
mov esi, dword [ebp - 0x410]
cmp esi, edi
je 0x48606d
mov ecx, dword [ebp - 0x420]
mov ebx, dword [esi]
push edi
call fcn.0041fc50
mov ecx, dword [ebx + 0xc]
push eax
push esi
call ecx
mov esi, eax
mov eax, dword [ebp - 0x410]
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
cmp esi, edi
jl 0x486072
mov edx, dword [ebp - 0x438]
mov eax, dword [ebp - 0x408]
mov ecx, dword [eax]
push edx
mov edx, dword [ebp - 0x42c]
push edx
push eax
mov eax, dword [ecx + 0xc]
call eax
mov esi, eax
cmp esi, edi
jl 0x486072
mov eax, dword [ebp - 0x408]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x14]
push eax
call edx
mov esi, eax
cmp esi, edi
jl 0x486072
mov eax, dword [ebp - 0x408]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [ebp - 0x428]
cmp eax, edi
je 0x486038
xor eax, dword [ebp - 0x408]
mov ecx, dword [ebp - 0x434]
cmp ecx, edi
je 0x48604a
mov edx, dword [ebp - 0x41c]
mov dword [ecx], edx
mov ecx, dword [ebp - 0x430]
cmp ecx, edi
je 0x4860da
pop edi
mov dword [ecx], eax
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401306
mov esp, ebp
pop ebp
ret
mov esi, 0x80004005
mov ebx, dword [ebp - 0x40c]
mov eax, dword [ebp - 0x408]
cmp eax, edi
je 0x48608a
mov ecx, dword [eax]
mov edx, dword [ecx + 0x18]
push eax
call edx
mov eax, dword [ebp - 0x414]
cmp eax, edi
je 0x48609c
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
cmp ebx, 0xffffffff
je 0x4860a8
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x41c]
cmp ecx, edi
je 0x4860c1
mov eax, dword [ebp - 0x418]
mov edx, dword [eax]
push ecx
push eax
mov eax, dword [edx + 0x10]
call eax
mov ecx, dword [ebp - 0x428]
cmp ecx, edi
je 0x4860da
mov eax, dword [ebp - 0x418]
mov edx, dword [eax]
push ecx
push eax
mov eax, dword [edx + 0x10]
call eax
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.00401306
mov esp, ebp
pop ebp
ret