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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50edd6
mov eax, dword fs:[0]
push eax
sub esp, 0x450
mov eax, dword [0x551aa8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov ecx, dword [esi + 0x50]
mov edi, dword [esi + 0x4c]
cmp edi, ecx
je 0x411899
mov eax, ecx
sub eax, ecx
sar eax, 2
lea ebx, [eax*4]
push ebx
push ecx
push edi
call dword [sym.imp.MSVCR100.dll_memmove]
add esp, 0xc
add ebx, edi
mov dword [esi + 0x50], ebx
mov ecx, dword [esi + 0x60]
mov eax, dword [esi + 0x5c]
lea ebx, [esi + 0x5c]
mov dword [ebp - 0x458], ebx
cmp eax, ecx
je 0x4118d3
mov edx, dword [ebp - 0x450]
push edx
push ecx
call fcn.00403f30
mov edi, dword [ebx + 4]
add esp, 8
mov dword [ebp - 0x44c], eax
call fcn.00403ef0
mov eax, dword [ebp - 0x44c]
mov dword [ebx + 4], eax
mov ecx, dword [esi + 0x70]
mov eax, dword [esi + 0x6c]
cmp eax, ecx
je 0x4118fa
mov edx, dword [ebp - 0x450]
push edx
push ecx
call fcn.00403f30
mov edi, dword [esi + 0x70]
add esp, 8
mov ebx, eax
call fcn.00403ef0
mov dword [esi + 0x70], ebx
mov ecx, dword [esi + 0x80]
mov eax, dword [esi + 0x7c]
lea ebx, [esi + 0x7c]
mov dword [ebp - 0x450], ebx
cmp eax, ecx
je 0x411937
mov edx, dword [ebp - 0x450]
push edx
push ecx
call fcn.00403f30
mov edi, dword [ebx + 4]
add esp, 8
mov dword [ebp - 0x44c], eax
call fcn.00403ef0
mov eax, dword [ebp - 0x44c]
mov dword [ebx + 4], eax
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
lea ecx, [esi + 0x34]
call dword [sym.imp.mfc100u.dll_ATL::CSimpleStringT_wchar_t_1_::GetBuffer_1]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x44c], eax
cmp eax, 0xffffffff
jne 0x411980
lea ecx, [esi + 0x34]
call dword [sym.imp.mfc100u.dll_ATL::CSimpleStringT_wchar_t_1_::GetBuffer_1]
push eax
push str._s_File_Not_Found
call fcn.004172c0
add esp, 8
jmp 0x411ba6
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea ebx, [edi + 3]
push ebx
call dword [sym.imp.mfc100u.dll_new__]
push ebx
mov esi, eax
push 0
push esi
call sub.MSVCR100.dll_memset
mov edx, dword [ebp - 0x44c]
add esp, 0x10
push 0
lea ecx, [ebp - 0x45c]
push ecx
push edi
push esi
push edx
mov dword [ebp - 0x454], esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov bl, byte [esi]
add esi, 2
push 0xd
push esi
call dword [sym.imp.MSVCR100.dll_strchr]
xor edi, edi
add esp, 8
cmp eax, edi
je 0x411b50
lea esp, [esp]
mov ecx, esi
sub ecx, dword [ebp - 0x454]
cmp ecx, dword [ebp - 0x45c]
jg 0x411b50
push esi
lea edx, [ebp - 0x410]
push 0x400
push edx
mov byte [eax], 0
call dword [sym.imp.MSVCR100.dll_strcpy_s]
lea eax, [ebp - 0x410]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x411a16
sub eax, edx
mov cl, byte [ebp + eax - 0x411]
cmp cl, 0xd
je 0x411a30
cmp cl, 0xa
jne 0x411a38
mov byte [ebp + eax - 0x411], 0
cmp byte [esi + eax + 1], 0xa
lea esi, [esi + eax + 1]
jne 0x411a44
inc esi
movsx eax, bl
sub eax, 0x43
je 0x411abf
dec eax
jne 0x411b74
mov byte [ebp - 0x448], al
lea eax, [ebp - 0x410]
mov dword [ebp - 0x434], 0xf
mov dword [ebp - 0x438], edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x411a72
sub eax, edx
push eax
lea eax, [ebp - 0x410]
push eax
lea ecx, [ebp - 0x448]
call fcn.0040aa50
mov dword [ebp - 4], edi
mov edi, dword [ebp - 0x458]
lea ecx, [ebp - 0x448]
call fcn.00413cb0
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x434], 0x10
jb 0x411b34
mov ecx, dword [ebp - 0x448]
push ecx
jmp 0x411b2b
lea eax, [ebp - 0x410]
mov dword [ebp - 0x418], 0xf
mov dword [ebp - 0x41c], edi
mov byte [ebp - 0x42c], 0
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x411ae0
sub eax, edx
push eax
lea edx, [ebp - 0x410]
push edx
lea ecx, [ebp - 0x42c]
call fcn.0040aa50
mov dword [ebp - 4], 1
mov edi, dword [ebp - 0x450]
lea ecx, [ebp - 0x42c]
call fcn.00413cb0
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x418], 0x10
jb 0x411b34
mov eax, dword [ebp - 0x42c]
push eax
call dword [sym.imp.mfc100u.dll_delete]
add esp, 4
mov bl, byte [esi]
add esi, 2
push 0xd
push esi
call dword [sym.imp.MSVCR100.dll_strchr]
add esp, 8
test eax, eax
je 0x411b50
xor edi, edi
jmp 0x4119e0
mov ecx, dword [ebp - 0x44c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x454]
push edx
call dword [sym.imp.mfc100u.dll_delete__]
add esp, 4
mov eax, 1
jmp 0x411ba8
push 0x593
push str.DnPatchThread.cpp
push str.0___Invalid_Patch_Code_
call dword [0x551f68]
mov eax, dword [ebp - 0x454]
push eax
call dword [sym.imp.mfc100u.dll_delete__]
mov ecx, dword [ebp - 0x44c]
add esp, 0x10
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0050bf32
mov esp, ebp
pop ebp
ret