Function at 0x51bef0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x118
push ebx
push ebp
push esi
mov ebp, ecx
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [ebp + 0x18]
lea ecx, [esp + 0x28]
push eax
push 0x5965b8
push str._shistory_s_symbols.sel
push 0xff
push ecx
mov dword [ebp + 0xa68], 0
call dword [sym.imp.MSVCRT.dll__snprintf]
lea edx, [esp + 0x3c]
push 0x581660
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebx, eax
add esp, 0x1c
test ebx, ebx
mov dword [esp + 0x20], ebx
je 0x51c232
mov eax, dword [ebx + 0x10]
mov esi, dword [sym.imp.MSVCRT.dll__filelength]
push eax
call esi
push ebx
push 1
lea ecx, [esp + 0x30]
push 4
push ecx
mov edi, eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x14
cmp eax, 1
je 0x51bf8e
push ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x118
ret
cmp dword [esp + 0x24], 0x190
je 0x51bfd5
push ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, edi
xor edx, edx
mov ecx, 0x70
add esp, 4
div ecx
test edx, edx
jne 0x51c240
mov ecx, ebp
call fcn.0051bc00
mov ecx, ebp
call fcn.0051c630
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x118
ret
mov edx, dword [ebx + 0x10]
push edx
call esi
mov esi, eax
add esp, 4
shr esi, 7
test esi, esi
jle 0x51c228
mov eax, dword [ebp + 0xa64]
test eax, eax
je 0x51c00a
cmp esi, dword [ebp + 0xa6c]
jle 0x51c07c
test eax, eax
je 0x51c00a
push eax
call fcn.004c2eb0
add esp, 4
lea eax, [esi + 0xa]
shl eax, 7
push eax
call fcn.004c2e90
mov edi, eax
add esp, 4
test edi, edi
mov dword [ebp + 0xa64], edi
jne 0x51c060
push ebx
mov dword [ebp + 0xa6c], eax
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
push ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0x245
push str.SymbolsBase:_not_enough_memory_for_selected_symbols___d_
push 1
push 0x596558
call fcn.004aa400
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x118
ret
lea ecx, [esi + 8]
xor eax, eax
mov dword [ebp + 0xa6c], ecx
shl ecx, 7
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [ebp + 0xa64]
mov eax, esi
push ebx
push 1
shl eax, 7
push eax
push ecx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 1
jne 0x51c0a0
mov dword [ebp + 0xa68], esi
mov eax, dword [ebp + 0xa68]
mov dword [esp + 0x14], 0
test eax, eax
jle 0x51c228
xor ebx, ebx
mov dword [esp + 0x10], 1
mov dword [esp + 0x18], ebx
mov edx, dword [ebp + 0xa64]
mov eax, dword [ebp + 0x5c]
mov ecx, ebx
add ecx, edx
xor edx, edx
test eax, eax
jle 0x51c190
mov edi, dword [ebp + 0x58]
mov dword [esp + 0x1c], edi
mov esi, ecx
mov bl, byte [esi]
mov al, bl
cmp bl, byte [edi]
jne 0x51c108
test al, al
je 0x51c104
mov bl, byte [esi + 1]
mov al, bl
cmp bl, byte [edi + 1]
jne 0x51c108
add esi, 2
add edi, 2
test al, al
jne 0x51c0e4
xor eax, eax
jmp 0x51c10d
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x51c129
mov edi, dword [esp + 0x1c]
mov eax, dword [ebp + 0x5c]
inc edx
add edi, 0x790
cmp edx, eax
mov dword [esp + 0x1c], edi
jl 0x51c0e2
jmp 0x51c18c
lea eax, [edx + edx*2]
mov esi, dword [ebp + 0x58]
lea eax, [eax + eax*4]
lea eax, [edx + eax*8]
shl eax, 4
mov esi, dword [esi + eax + 0x74]
mov dword [ecx + 0x10], esi
mov esi, dword [ebp + 0x58]
mov esi, dword [eax + esi + 0x68]
mov dword [ecx + 0xc], esi
mov esi, dword [ebp + 0x58]
mov esi, dword [eax + esi + 0x64]
mov dword [ecx + 0x18], esi
mov esi, dword [ebp + 0x58]
mov edi, dword [eax + esi + 0x6f0]
mov dword [ecx + 0x20], edi
mov esi, dword [eax + esi + 0x6f4]
mov dword [ecx + 0x24], esi
mov esi, dword [ebp + 0x58]
mov esi, dword [eax + esi + 0x67c]
mov dword [ecx + 0x28], esi
mov esi, dword [ebp + 0x58]
mov eax, dword [eax + esi + 0x680]
mov byte [ecx + 0x34], 1
mov dword [ecx + 0x2c], eax
mov byte [ecx + 0x35], 0
mov ebx, dword [esp + 0x18]
cmp edx, dword [ebp + 0x5c]
jl 0x51c1fa
mov ecx, dword [ebp + 0xa68]
mov eax, dword [esp + 0x10]
cmp eax, ecx
jge 0x51c1cb
mov edi, dword [esp + 0x14]
mov eax, dword [ebp + 0xa64]
sub ecx, edi
dec ecx
lea esi, [ebx + eax + 0x80]
shl ecx, 7
mov edx, ecx
lea edi, [ebx + eax]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp + 0xa68]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
dec esi
dec edx
dec ecx
mov dword [ebp + 0xa60], 1
mov dword [ebp + 0xa68], esi
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], ecx
sub ebx, 0x80
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
mov ecx, dword [ebp + 0xa68]
inc eax
inc esi
add ebx, 0x80
cmp eax, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], esi
mov dword [esp + 0x18], ebx
jl 0x51c0c4
mov ebx, dword [esp + 0x20]
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
push ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, ebp
call fcn.0051c340
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x118
ret