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

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6d994b
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x438
mov eax, dword [0x79a200]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esi + 0x4c]
cmp eax, dword [esi + 0x50]
je 0x4178ee
mov dword [esi + 0x50], eax
mov ecx, dword [esi + 0x58]
lea edi, [esi + 0x58]
mov edx, dword [edi + 4]
mov dword [ebp - 0x444], edi
cmp ecx, edx
je 0x41790f
push ecx
call fcn.00408f00
mov eax, dword [edi]
add esp, 4
mov dword [edi + 4], eax
mov ecx, dword [esi + 0x64]
mov edx, dword [esi + 0x68]
cmp ecx, edx
je 0x417928
push ecx
call fcn.00408f00
mov eax, dword [esi + 0x64]
add esp, 4
mov dword [esi + 0x68], eax
mov ecx, dword [esi + 0x70]
lea edi, [esi + 0x70]
mov edx, dword [edi + 4]
mov dword [ebp - 0x448], edi
cmp ecx, edx
je 0x417949
push ecx
call fcn.00408f00
mov eax, dword [edi]
add esp, 4
mov dword [edi + 4], eax
mov eax, dword [esi + 0x34]
cmp dword [eax - 4], 1
jle 0x41795d
push dword [eax - 0xc]
lea ecx, [esi + 0x34]
call fcn.00406e20
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push dword [esi + 0x34]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x43c], eax
cmp eax, 0xffffffff
jne 0x4179ae
mov eax, dword [esi + 0x34]
cmp dword [eax - 4], 1
jle 0x417997
push dword [eax - 0xc]
lea ecx, [esi + 0x34]
call fcn.00406e20
push dword [esi + 0x34]
push str._s_File_Not_Found
call fcn.0041d700
add esp, 8
xor eax, eax
jmp 0x417bc4
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea esi, [edi + 3]
push esi
call fcn.00545633
add esp, 4
mov dword [ebp - 0x438], eax
push esi
mov esi, eax
push 0
push esi
call fcn.00690e10
add esp, 0xc
mov dword [ebp - 0x438], esi
lea eax, [ebp - 0x440]
push 0
push eax
push edi
push esi
push dword [ebp - 0x43c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov al, byte [esi]
add esi, 2
push 0xd
push esi
mov byte [ebp - 0x431], al
call fcn.006906b0
mov edi, dword [ebp - 0x438]
add esp, 8
test eax, eax
je 0x417ba6
nop word [eax + eax]
mov ecx, esi
sub ecx, edi
cmp ecx, dword [ebp - 0x440]
jg 0x417ba6
push esi
mov byte [eax], 0
lea eax, [ebp - 0x418]
push 0x400
push eax
call fcn.006a681f
lea ecx, [ebp - 0x418]
add esp, 0xc
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x417a51
sub ecx, edx
mov al, byte [ebp + ecx - 0x419]
cmp al, 0xd
je 0x417a69
cmp al, 0xa
jne 0x417a7f
lea eax, [ecx - 1]
cmp eax, 0x400
jae 0x417c16
mov byte [ebp + eax - 0x418], 0
inc esi
add esi, ecx
cmp byte [esi], 0xa
jne 0x417a88
inc esi
movsx eax, byte [ebp - 0x431]
sub eax, 0x43
je 0x417aeb
sub eax, 1
jne 0x417be2
xorps xmm0, xmm0
mov dword [ebp - 0x420], eax
lea ecx, [ebp - 0x418]
mov dword [ebp - 0x41c], eax
movups xmmword [ebp - 0x430], xmm0
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x417ac0
sub ecx, edx
lea eax, [ebp - 0x418]
push ecx
push eax
lea ecx, [ebp - 0x430]
call fcn.00415170
mov ecx, dword [ebp - 0x444]
mov dword [ebp - 4], 0
jmp 0x417b3b
xorps xmm0, xmm0
mov dword [ebp - 0x420], 0
lea ecx, [ebp - 0x418]
mov dword [ebp - 0x41c], 0
movups xmmword [ebp - 0x430], xmm0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x417b12
sub ecx, edx
lea eax, [ebp - 0x418]
push ecx
push eax
lea ecx, [ebp - 0x430]
call fcn.00415170
mov ecx, dword [ebp - 0x448]
mov dword [ebp - 4], 1
lea eax, [ebp - 0x430]
push eax
call fcn.0041a500
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x41c]
cmp ecx, 0xf
jbe 0x417b88
mov edx, dword [ebp - 0x430]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x417b7e
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x417c1b
push ecx
push edx
call fcn.0068d77d
add esp, 8
mov al, byte [esi]
add esi, 2
push 0xd
push esi
mov byte [ebp - 0x431], al
call fcn.006906b0
add esp, 8
test eax, eax
jne 0x417a20
push dword [ebp - 0x43c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x417bbf
push edi
call fcn.0054562e
add esp, 4
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0068d76f
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
push 0x4f5
push str.X:RepositoryProjectHunterProjectHunterClientDnLauncherDnPatchThread.cpp
push str.0___Invalid_Patch_Code_
call fcn.0042b250
add esp, 0xc
test edi, edi
je 0x417c06
push edi
call fcn.0054562e
add esp, 4
push dword [ebp - 0x43c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x417bc4
call fcn.0068de5c
call fcn.006944a3
int3