Function at 0x51bc00
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x110
mov al, byte [0x5937a0]
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov byte [esp + 0x20], al
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x21]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push esi
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea ecx, [esi + 0x18]
lea edx, [esp + 0x20]
push ecx
push 0x5965b8
push str._shistory_s_symbols.sel
xor ebp, ebp
push 0xff
push edx
mov dword [esi + 0xa68], ebp
call dword [sym.imp.MSVCRT.dll__snprintf]
lea eax, [esp + 0x34]
push 0x581660
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebx, eax
add esp, 0x1c
cmp ebx, ebp
mov dword [esp + 0x1c], ebx
je 0x51bedf
mov ecx, dword [ebx + 0x10]
push ecx
call dword [sym.imp.MSVCRT.dll__filelength]
mov ecx, eax
mov eax, 0x24924925
mul ecx
sub ecx, edx
add esp, 4
shr ecx, 1
add ecx, edx
shr ecx, 6
mov edi, ecx
cmp edi, ebp
mov dword [esp + 0x10], edi
jle 0x51bed5
mov eax, dword [esi + 0xa64]
cmp eax, ebp
je 0x51bccb
cmp edi, dword [esi + 0xa6c]
jle 0x51bd1b
cmp eax, ebp
je 0x51bccb
push eax
call fcn.004c2eb0
add esp, 4
mov dword [esi + 0xa64], ebp
lea edx, [edi + 0xa]
shl edx, 7
push edx
call fcn.004c2e90
add esp, 4
cmp eax, ebp
mov dword [esi + 0xa64], eax
jne 0x51bd12
push esi
mov dword [esi + 0xa6c], ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0x1f7
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
mov esp, ebp
pop ebp
ret
lea eax, [edi + 8]
mov dword [esi + 0xa6c], eax
cmp edi, ebp
mov dword [esp + 0x18], ebp
jle 0x51bed5
jmp 0x51bd2b
xor ebp, ebp
mov ecx, dword [esi + 0xa68]
mov edx, dword [esi + 0xa64]
shl ecx, 7
push ebx
push 1
add ecx, edx
push 0x70
push ecx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 1
jne 0x51bed5
mov edx, dword [esi + 0xa68]
mov eax, dword [esi + 0xa64]
shl edx, 7
add eax, edx
mov ecx, dword [eax + 0x40]
mov dword [eax + 0x70], ecx
mov edx, dword [eax + 0x44]
mov dword [eax + 0x74], edx
mov eax, dword [esi + 0xa68]
mov ecx, dword [esi + 0xa64]
shl eax, 7
add eax, ecx
mov edx, dword [eax + 0x48]
mov dword [eax + 0x78], edx
mov ecx, dword [eax + 0x4c]
mov dword [eax + 0x7c], ecx
mov eax, dword [esi + 0x5c]
test eax, eax
jle 0x51beb9
mov eax, dword [esi + 0xa68]
mov ecx, dword [esi + 0xa64]
mov edx, dword [esi + 0x58]
shl eax, 7
add eax, ecx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x14]
mov edi, edx
mov bl, byte [eax]
mov cl, bl
cmp bl, byte [edi]
jne 0x51bddb
test cl, cl
je 0x51bdd7
mov bl, byte [eax + 1]
mov cl, bl
cmp bl, byte [edi + 1]
jne 0x51bddb
add eax, 2
add edi, 2
test cl, cl
jne 0x51bdb7
xor eax, eax
jmp 0x51bde0
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x51bdff
mov eax, dword [esi + 0x5c]
inc ebp
add edx, 0x790
cmp ebp, eax
jl 0x51bdb1
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x1c]
jmp 0x51beb9
lea eax, [ebp + ebp*2]
mov ecx, dword [esi + 0x58]
lea edx, [eax + eax*4]
lea eax, [ebp + edx*8]
mov edx, dword [esp + 0x14]
shl eax, 4
mov ecx, dword [ecx + eax + 0x68]
mov dword [edx + 0xc], ecx
mov ecx, dword [esi + 0x58]
mov edx, dword [esi + 0xa68]
mov edi, dword [esi + 0xa64]
mov ecx, dword [eax + ecx + 0x74]
shl edx, 7
mov dword [edx + edi + 0x10], ecx
mov edx, dword [esi + 0x58]
mov ecx, dword [esi + 0xa68]
mov edi, dword [esi + 0xa64]
mov edx, dword [eax + edx + 0x64]
shl ecx, 7
mov dword [ecx + edi + 0x18], edx
mov ecx, dword [esi + 0x58]
mov edx, dword [esi + 0xa68]
mov edi, dword [esi + 0xa64]
mov ebx, dword [eax + ecx + 0x6f0]
shl edx, 7
mov dword [edx + edi + 0x20], ebx
mov ecx, dword [eax + ecx + 0x6f4]
mov ebx, dword [esp + 0x1c]
mov dword [edx + edi + 0x24], ecx
mov edx, dword [esi + 0x58]
mov ecx, dword [esi + 0xa68]
mov edi, dword [esi + 0xa64]
mov edx, dword [eax + edx + 0x67c]
shl ecx, 7
mov dword [ecx + edi + 0x28], edx
mov ecx, dword [esi + 0x58]
mov edx, dword [esi + 0xa68]
mov edi, dword [esi + 0xa64]
mov eax, dword [eax + ecx + 0x680]
shl edx, 7
mov dword [edx + edi + 0x2c], eax
mov edi, dword [esp + 0x10]
cmp ebp, dword [esi + 0x5c]
jge 0x51bec4
inc dword [esi + 0xa68]
mov eax, dword [esp + 0x18]
inc eax
cmp eax, edi
mov dword [esp + 0x18], eax
jl 0x51bd29
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret