Function at 0x4164f6
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4700cf
mov eax, dword fs:[0]
push eax
mov eax, 0x231c
call fcn.00434ed0
mov eax, dword [0x496b64]
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 eax, dword [ebp + 8]
lea ecx, [ebp - 0x2230]
push str.fileLogger
mov dword [ebp - 0x225c], eax
call fcn.0040701e
lea eax, [ebp - 0x2230]
xor ebx, ebx
push eax
lea eax, [ebp - 0x2270]
mov dword [ebp - 4], ebx
push eax
call fcn.0041b7f7
pop ecx
pop ecx
xor edi, edi
mov byte [ebp - 4], 2
push ebx
inc edi
lea ecx, [ebp - 0x2230]
push edi
call fcn.0040a6f3
push edi
push 3
lea ecx, [ebp - 0x2328]
call fcn.00412a37
lea eax, [ebp - 0x2318]
mov byte [ebp - 4], 3
push str.10240
push eax
call fcn.0040f29c
pop ecx
pop ecx
lea eax, [ebp - 0x2278]
push eax
lea ecx, [ebp - 0x2328]
call fcn.00407a70
push 0x104
lea eax, [ebp - 0x218]
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameW]
push ebx
push ebx
push 3
push ebx
push edi
push 0x80000000
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov dword [ebp - 0x2268], eax
cmp eax, 0xffffffff
jne 0x416606
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov ecx, dword [ebp - 0x2270]
mov dword [ebp - 0x225c], eax
lea eax, [ebp - 0x225c]
push eax
push str.CreateFile_failed_with_error_
push 4
call fcn.004113c1
jmp 0x416907
lea eax, [ebp - 0x2268]
mov dword [ebp - 0x2234], ebx
mov dword [ebp - 0x2264], eax
lea ecx, [ebp - 0x2258]
lea eax, [ebp - 0x2264]
push eax
call fcn.004101a2
mov eax, dword [ebp - 0x2278]
push 2
push ebx
neg eax
mov byte [ebp - 4], 4
push eax
push dword [ebp - 0x2268]
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
cmp eax, 0xffffffff
jne 0x416665
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebp - 0x225c], eax
lea eax, [ebp - 0x225c]
push eax
push str.Failed_to_set_file_pointer__error_
jmp 0x4166bb
push 0x2000
lea eax, [ebp - 0x2218]
push ebx
push eax
call fcn.0044e660
add esp, 0xc
mov dword [ebp - 0x2260], ebx
lea eax, [ebp - 0x2260]
push ebx
mov ebx, dword [sym.imp.KERNEL32.DLL_ReadFile]
push eax
push 4
lea eax, [ebp - 0x2218]
push eax
push dword [ebp - 0x2268]
call ebx
test eax, eax
jne 0x4166c2
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebp - 0x225c], eax
lea eax, [ebp - 0x225c]
push eax
push str.Read_file_failed_with_error_
push 4
jmp 0x41674d
push 4
pop esi
cmp dword [ebp - 0x2260], esi
je 0x4166e3
mov ecx, dword [ebp - 0x2270]
push 0x47a1a4
push esi
call fcn.0040361d
jmp 0x4168fc
cmp byte [ebp - 0x2218], 0x47
jne 0x4168cf
cmp byte [ebp - 0x2217], 0x4f
jne 0x4168cf
cmp byte [ebp - 0x2216], 0x47
jne 0x4168cf
cmp byte [ebp - 0x2215], 0xff
jne 0x4168cf
push 0
lea eax, [ebp - 0x2260]
push eax
push esi
lea eax, [ebp - 0x2218]
push eax
push dword [ebp - 0x2268]
call ebx
test eax, eax
jne 0x41675d
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebp - 0x225c], eax
lea eax, [ebp - 0x225c]
push eax
push str.Read_file_failed_with_error_
push esi
mov ecx, dword [ebp - 0x2270]
call fcn.004113c1
jmp 0x4168fc
cmp dword [ebp - 0x2260], esi
je 0x41677b
mov ecx, dword [ebp - 0x2270]
push str.Read_less_than_4_bytes_from_token_size_place.
push esi
call fcn.00403735
jmp 0x4168fc
mov eax, dword [ebp - 0x2218]
mov esi, dword [ebp - 0x2270]
mov ecx, esi
mov dword [ebp - 0x2264], eax
lea eax, [ebp - 0x2264]
push eax
push str.Token_size:___
push 2
call fcn.00411187
mov ebx, dword [ebp - 0x2264]
test ebx, ebx
jne 0x4167b7
push str.Token_empty._Not_reading_rest_of_file.
push 2
mov ecx, esi
jmp 0x416771
mov eax, dword [ebp - 0x2278]
add eax, 0xfffffffc
cmp ebx, eax
jle 0x4167e4
mov dword [ebp - 0x225c], eax
mov ecx, esi
lea eax, [ebp - 0x225c]
push eax
push str.Token_size_too_big:_should_be_maximum___.
push 4
call fcn.00411072
jmp 0x4168fc
push 0
lea eax, [ebp - 0x2260]
push eax
push ebx
lea eax, [ebp - 0x2218]
push eax
push dword [ebp - 0x2268]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
jne 0x416826
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebp - 0x225c], eax
mov ecx, esi
lea eax, [ebp - 0x225c]
push eax
push str.Read_file_failed_with_error_
push 4
jmp 0x416753
cmp dword [ebp - 0x2260], ebx
je 0x41684f
lea eax, [ebp - 0x2264]
mov ecx, esi
push eax
lea eax, [ebp - 0x2260]
push eax
push str.Read_wrong_amount_of_bytes:_____when_wanted_to_read____from_token_place.
push 4
call fcn.00411218
jmp 0x4168fc
lea eax, [ebp - 0x2271]
push eax
lea eax, [ebp - 0x2218]
add eax, ebx
lea ecx, [ebp - 0x2230]
push eax
lea eax, [ebp - 0x2218]
push eax
call fcn.0040ee48
mov ecx, dword [ebp - 0x225c]
push eax
call fcn.00413b74
push 0
push edi
lea ecx, [ebp - 0x2230]
call fcn.0040a6f3
mov ecx, dword [ebp - 0x225c]
mov eax, dword [ecx + 0x10]
cmp eax, ebx
je 0x4168bc
mov dword [ebp - 0x225c], eax
mov ecx, esi
lea eax, [ebp - 0x2264]
push eax
lea eax, [ebp - 0x225c]
push eax
push str.Token_size_after_conversion_does_not_match__is____while_should_be___
push 4
call fcn.00411218
jmp 0x4168fc
push ecx
push str.Succeeded_to_read_token:___
push 2
mov ecx, esi
call fcn.004039d9
xor edi, edi
jmp 0x4168fc
mov ecx, dword [ebp - 0x2270]
lea eax, [ebp - 0x2215]
push eax
lea eax, [ebp - 0x2216]
push eax
lea eax, [ebp - 0x2217]
push eax
lea eax, [ebp - 0x2218]
push eax
push str.Wrong_value_of_header___:x::x::x::x_
push esi
call fcn.00410f54
lea ecx, [ebp - 0x2258]
call fcn.0040779e
lea ecx, [ebp - 0x2328]
call fcn.00413fa1
mov ecx, dword [ebp - 0x226c]
test ecx, ecx
je 0x416921
call fcn.00408d35
mov eax, edi
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.0043499a
mov esp, ebp
pop ebp
ret