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

Disassembly:
push 0xffffffffffffffff
push 0x4921d8
mov eax, dword fs:[0]
push eax
sub esp, 0x34
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4aab30]
xor eax, esp
push eax
lea eax, [esp + 0x48]
mov dword fs:[0], eax
xor esi, esi
cmp byte [0x4b23b8], 0
mov dword [esp + 0x1c], esi
jne 0x413bb8
push 0x4b1b64
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov byte [0x4b23b8], 1
push 0x10000
mov dword [esp + 0x44], esi
mov dword [esp + 0x40], esi
call fcn.0047a780
mov edi, eax
add esp, 4
mov dword [esp + 0x44], edi
cmp edi, esi
je 0x413bdf
mov dword [esp + 0x40], 0x10000
mov eax, dword [esp + 0x58]
push esi
push 0x80
push 3
push esi
push 7
push SysReAllocString
push eax
mov dword [esp + 0x6c], esi
mov byte [esp + 0x33], 1
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [esp + 0x24], ebx
cmp ebx, 0xffffffff
jne 0x413c1d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x1c], eax
jmp 0x413e2c
lea ecx, [esp + 0x34]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov edi, dword [esp + 0x5c]
mov ebp, dword [esp + 0x60]
mov edx, edi
or edx, ebp
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], esi
je 0x413c59
push 0
push 0
push ebp
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
cmp eax, 1
jne 0x413c59
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], ebp
mov ebp, dword [esp + 0x40]
lea ecx, [ecx]
mov eax, dword [esp + 0x44]
push 0
mov edx, ebp
lea ecx, [esp + 0x1c]
push ecx
sub edx, esi
dec edx
push edx
lea edi, [eax + esi]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x413e11
mov eax, dword [esp + 0x18]
xor ebx, ebx
cmp eax, ebx
je 0x413ded
mov dword [esp + 0x20], ebx
mov byte [edi + eax], bl
mov ecx, dword [esp + 0x18]
lea eax, [esi + ecx]
cmp eax, ebp
jbe 0x413cbd
push 0x30
push str.Error
push str.Written_data_is_across_the_size_boundary_
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
mov ecx, dword [esp + 0x18]
jmp 0x413cc3
mov esi, eax
mov dword [esp + 0x3c], esi
test ecx, ecx
jbe 0x413cd2
cmp byte [edi + ebx], 0
jne 0x413cd2
inc ebx
cmp ebx, ecx
jb 0x413cc7
mov ecx, dword [esp + 0x44]
lea eax, [esp + 0x20]
push eax
add ecx, ebx
push 0x49d93c
push ecx
call fcn.0047c417
add esp, 0xc
test eax, eax
je 0x413dbe
mov ecx, eax
lea edi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x413cf8
sub ecx, edi
lea edx, [ecx + ebx + 1]
cmp edx, esi
ja 0x413da2
mov ecx, eax
lea edi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x413d12
sub ecx, edi
lea edi, [ecx + 1]
mov ecx, eax
add ebx, edi
lea ebp, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x413d25
sub ecx, ebp
je 0x413d5d
mov ecx, eax
lea ebp, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x413d35
sub ecx, ebp
cmp byte [ecx + eax - 1], 0xd
jne 0x413d5d
mov ecx, eax
lea ebp, [ecx + 1]
lea ebx, [ebx]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x413d50
sub ecx, ebp
mov byte [ecx + eax - 1], dl
mov ecx, fcn.00415e00
test ecx, ecx
je 0x413d99
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x30]
push eax
mov eax, dword [esp + 0x38]
push edx
push eax
mov eax, dword [esp + 0x38]
mov edx, edi
xor ebp, ebp
add edx, eax
adc ebp, ecx
push ebp
push edx
push ecx
push eax
mov eax, dword [esp + 0x80]
push eax
call fcn.00415e00
add esp, 0x20
mov byte [esp + 0x17], al
add dword [esp + 0x2c], edi
adc dword [esp + 0x30], 0
lea ecx, [esp + 0x20]
push ecx
push 0x49d93c
push 0
call fcn.0047c417
add esp, 0xc
test eax, eax
jne 0x413cf3
test ebx, ebx
je 0x413ddc
cmp esi, ebx
jb 0x413ded
mov eax, dword [esp + 0x44]
sub esi, ebx
push esi
lea edx, [eax + ebx]
push edx
push eax
call fcn.0047d7b0
add esp, 0xc
jmp 0x413de9
mov eax, dword [esp + 0x40]
sub eax, esi
cmp eax, 1
ja 0x413ded
xor esi, esi
mov dword [esp + 0x3c], esi
cmp byte [esp + 0x17], 0
je 0x413e1d
cmp dword [esp + 0x18], 0
je 0x413e1d
mov ebp, dword [esp + 0x40]
mov ecx, ebp
sub ecx, esi
cmp ecx, 1
jbe 0x413e1d
mov ebx, dword [esp + 0x24]
jmp 0x413c60
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x1c], eax
jmp 0x413e21
mov ebx, dword [esp + 0x24]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [esp + 0x44]
push edi
call fcn.0047a868
mov eax, dword [esp + 0x20]
add esp, 4
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret