Function at 0x475120
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x1ce8
call fcn.00563290
push ebx
push ebp
mov ebp, dword [esp + 0x1cf4]
mov ebx, ecx
push esi
push edi
test ebp, ebp
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], 0
jne 0x475156
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1ce8
ret 4
lea eax, [ebp + 0x38]
push 0x581660
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
mov dword [esp + 0x18], esi
jne 0x47517f
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1ce8
ret 4
push esi
push 1
lea ecx, [esp + 0x28]
push 0x2d8
push ecx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 1
je 0x4751b3
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1ce8
ret 4
cmp dword [esp + 0x20], 0x195
je 0x4751d6
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1ce8
ret 4
mov edx, dword [esi + 0x10]
push edx
call dword [sym.imp.MSVCRT.dll__filelength]
mov ecx, eax
mov eax, 0x4ec4ec4f
sub ecx, 0x2d8
add esp, 4
mul ecx
mov edi, edx
shr edi, 4
cmp edi, 1
mov dword [esp + 0x10], edi
jge 0x475219
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1ce8
ret 4
mov eax, dword [ebx + 0x854]
cmp edi, eax
jle 0x47522f
sub edi, eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edi
mov edi, eax
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp edi, dword [ebp + 0xc]
jge 0x475246
mov eax, dword [ebp + 4]
test eax, eax
jne 0x4752d5
mov eax, dword [ebp + 4]
test eax, eax
je 0x475256
push eax
call fcn.004c2eb0
add esp, 4
lea edx, [edi + edi*4 + 0x500]
lea eax, [edi + edx*2 + 0x100]
shl eax, 2
push eax
call fcn.004c2e90
add esp, 4
mov dword [ebp + 4], eax
test eax, eax
jne 0x4752c5
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
xor eax, eax
add esp, 4
mov dword [ebp + 0xc], eax
mov dword [ebp + 8], eax
mov ecx, dword [ebx + 0x7f8]
mov edx, dword [ebx + 0x7ec]
push ecx
lea eax, [ebx + 0x58]
push edx
push eax
push str.HistoryBase:_not_enough_memory__s_d___d_bars_
push 4
push 0x596558
call fcn.004aa400
add esp, 0x18
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1ce8
ret 4
lea ecx, [edi + 0xfa]
mov dword [ebp + 0x18], 0xffffffff
mov dword [ebp + 0xc], ecx
mov edx, dword [ebp + 0x18]
mov eax, dword [ebx + 0x804]
cmp edx, eax
jne 0x4752f2
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
push ebx
jmp 0x4753c0
mov eax, dword [esp + 0x14]
test eax, eax
jle 0x475312
lea ecx, [eax + eax*2 + 0x2a]
push 0
lea edx, [eax + ecx*4 + 0xe]
shl edx, 2
push edx
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
mov ebx, dword [ebp + 4]
push esi
push 0x80
lea eax, [esp + 0x300]
push 0x34
push eax
mov dword [ebp + 8], 0
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
test eax, eax
jle 0x47537d
test eax, eax
lea edx, [esp + 0x2f8]
jle 0x475360
mov esi, edx
mov edi, ebx
mov ecx, 0xb
add ebx, 0x2c
add edx, 0x34
dec eax
rep movsd dword es:[edi], dword [esi]
jne 0x475344
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x18]
push esi
push 0x80
lea ecx, [esp + 0x300]
push 0x34
push ecx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
test eax, eax
jg 0x475339
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esp + 0x20]
mov ecx, dword [ebp + 0x10]
mov dword [ebp + 8], edi
add esp, 4
mov edx, dword [eax + 0x804]
cmp ecx, edi
mov dword [ebp + 0x18], edx
jl 0x4753b1
mov esi, dword [ebp + 0x14]
mov ecx, edi
sub ecx, esi
inc ecx
cmp ecx, edi
mov dword [ebp + 0x10], ecx
jl 0x4753b1
dec edi
mov dword [ebp + 0x10], edi
mov ecx, dword [ebp + 0x10]
test ecx, ecx
jge 0x4753bf
mov dword [ebp + 0x10], 0
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x1ce8
ret 4