Function at 0x4164c4
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4700df
mov eax, dword fs:[0]
push eax
mov eax, 0x231c
call fcn.00434ef0
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.0041b7c1
pop ecx
pop ecx
xor edi, edi
mov byte [ebp - 4], 2
push ebx
inc edi
lea ecx, [ebp - 0x2230]
push edi
call fcn.0040a6c8
push edi
push 3
lea ecx, [ebp - 0x2328]
call fcn.00412a05
lea eax, [ebp - 0x2318]
mov byte [ebp - 4], 3
push str.10240
push eax
call fcn.0040f269
pop ecx
pop ecx
lea eax, [ebp - 0x2278]
push eax
lea ecx, [ebp - 0x2328]
call fcn.00407a81
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 0x4165d4
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.0041138f
jmp 0x4168d5
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.0041011b
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 0x416633
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 0x416689
push 0x2000
lea eax, [ebp - 0x2218]
push ebx
push eax
call fcn.0044e670
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 0x416690
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 0x41671b
push 4
pop esi
cmp dword [ebp - 0x2260], esi
je 0x4166b1
mov ecx, dword [ebp - 0x2270]
push 0x47a1a4
push esi
call fcn.0040361d
jmp 0x4168ca
cmp byte [ebp - 0x2218], 0x47
jne 0x41689d
cmp byte [ebp - 0x2217], 0x4f
jne 0x41689d
cmp byte [ebp - 0x2216], 0x47
jne 0x41689d
cmp byte [ebp - 0x2215], 0xff
jne 0x41689d
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 0x41672b
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.0041138f
jmp 0x4168ca
cmp dword [ebp - 0x2260], esi
je 0x416749
mov ecx, dword [ebp - 0x2270]
push str.Read_less_than_4_bytes_from_token_size_place.
push esi
call fcn.00403735
jmp 0x4168ca
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.00411155
mov ebx, dword [ebp - 0x2264]
test ebx, ebx
jne 0x416785
push str.Token_empty._Not_reading_rest_of_file.
push 2
mov ecx, esi
jmp 0x41673f
mov eax, dword [ebp - 0x2278]
add eax, 0xfffffffc
cmp ebx, eax
jle 0x4167b2
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.00411040
jmp 0x4168ca
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 0x4167f4
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 0x416721
cmp dword [ebp - 0x2260], ebx
je 0x41681d
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.004111e6
jmp 0x4168ca
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.0040ee15
mov ecx, dword [ebp - 0x225c]
push eax
call fcn.00413b42
push 0
push edi
lea ecx, [ebp - 0x2230]
call fcn.0040a6c8
mov ecx, dword [ebp - 0x225c]
mov eax, dword [ecx + 0x10]
cmp eax, ebx
je 0x41688a
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.004111e6
jmp 0x4168ca
push ecx
push str.Succeeded_to_read_token:___
push 2
mov ecx, esi
call fcn.004039d9
xor edi, edi
jmp 0x4168ca
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.00410f22
lea ecx, [ebp - 0x2258]
call fcn.0040779e
lea ecx, [ebp - 0x2328]
call fcn.00413f6f
mov ecx, dword [ebp - 0x226c]
test ecx, ecx
je 0x4168ef
call fcn.00408d46
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.004349b3
mov esp, ebp
pop ebp
ret