Function at 0x18085a55
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x181ce00c]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x14]
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
push edi
mov dword [ebp - 0x4c], eax
lea edi, [ebp - 0x3c]
xor eax, eax
mov dword [ebp - 0x54], esi
stosd dword es:[edi], eax
push ecx
push 0x100000
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x40], ebx
stosd dword es:[edi], eax
mov dword [ebp - 0x44], ebx
stosd dword es:[edi], eax
call fcn.180114d6
call fcn.180859b3
mov ecx, dword [esi]
mov edi, eax
mov eax, dword [esi + 4]
mov edx, ebx
sub eax, ecx
mov dword [ebp - 0x10], edi
sar eax, 2
mov dword [ebp - 0x48], ebx
test eax, eax
je 0x18085b83
push ebx
push 0x80
push 3
push ebx
push 1
push 1
push dword [ecx + edx*4]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x18085c5d
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], ebx
push eax
push esi
mov dword [ebp - 0x18], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x18085c5d
mov eax, dword [ebp - 0x40]
add eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x44]
adc ecx, dword [ebp - 0x18]
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x44], ecx
cmp ecx, ebx
ja 0x18085c56
jb 0x18085b14
cmp eax, 0x40000000
ja 0x18085c56
mov eax, dword [ebp - 0x38]
sub eax, dword [ebp - 0x3c]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x50], eax
push ebx
lea ecx, [ebp - 0xc]
push ecx
push eax
push dword [ebp - 0x3c]
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x18085c4d
mov ecx, dword [ebp - 0xc]
test ecx, ecx
je 0x18085b59
mov eax, dword [edi]
push ecx
push dword [ebp - 0x3c]
mov ebx, dword [eax + 4]
mov ecx, ebx
call dword [0x1815e3d4]
mov ecx, edi
call ebx
mov ecx, dword [ebp - 0xc]
xor ebx, ebx
mov eax, dword [ebp - 0x50]
cmp ecx, eax
je 0x18085b20
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x54]
mov edx, dword [ebp - 0x48]
inc edx
mov dword [ebp - 0x48], edx
mov ecx, dword [eax]
mov eax, dword [eax + 4]
sub eax, ecx
sar eax, 2
cmp edx, eax
jb 0x18085ab3
xor eax, eax
lea edi, [ebp - 0x30]
stosd dword es:[edi], eax
push ecx
push 0x20
lea ecx, [ebp - 0x30]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.18085d95
mov esi, dword [ebp - 0x10]
mov eax, dword [esi]
mov edi, dword [eax + 8]
mov ecx, edi
call dword [0x1815e3d4]
mov ecx, esi
call edi
push 0x20
pop esi
push esi
push eax
push dword [ebp - 0x30]
call fcn.1812f180
mov eax, dword [ebp - 0x4c]
add esp, 0xc
push esi
test eax, eax
je 0x18085c72
push dword [ebp - 0x30]
push dword [eax]
call fcn.1812fa01
add esp, 0xc
test eax, eax
je 0x18085c87
mov dword [ebp - 0xc], ebx
call fcn.18006f7b
push eax
lea ecx, [ebp - 0xc]
call fcn.1800768f
mov ecx, dword [ebp - 0x30]
lea eax, [ebp - 0xc]
xor edi, edi
mov edx, esi
inc edi
push edi
push eax
call fcn.1801308e
mov esi, dword [ebp - 0xc]
pop ecx
pop ecx
movzx ecx, byte [0x181d4056]
neg ecx
sbb ecx, ecx
and ecx, 0x181d3f50
je 0x18085c3e
push 9
pop eax
push edi
push eax
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edi
call fcn.18008b3f
push esi
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x24]
push str._actual_hash_S_
push eax
call fcn.18007210
add esp, 0xc
lea ecx, [esi - 0x10]
call fcn.18006f52
mov ebx, 0x80040204
jmp 0x18085c87
call fcn.1801bb25
mov ebx, eax
jmp 0x18085c69
mov ebx, 0x80040205
jmp 0x18085c64
call fcn.1801bb25
mov ebx, eax
cmp esi, 0xffffffff
je 0x18085c8f
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x18085c8f
xor ecx, ecx
call fcn.1800f827
push esi
push dword [ebp - 0x30]
push dword [ebx]
call fcn.1812f180
add esp, 0xc
lea ecx, [ebp - 0x30]
call fcn.1801154f
lea ecx, [ebp - 0x10]
call fcn.1803fbd9
lea ecx, [ebp - 0x3c]
call fcn.1801154f
mov ecx, dword [ebp - 8]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1811aa48
leave
ret 0x14