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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x598
push ebx
push esi
push edi
mov dword [ebp - 4], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x53c], 1
mov dword [ebp - 0x540], 0xffffffff
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
push str.CalculateAllowedMACs._1.__08X.__08X.
push 0x100273cc
push 3
call fcn.1000eed0
add esp, 0x14
cmp dword [0x10038c5c], 0
je 0x1001bb20
lea edx, [ebp - 0xc]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x1ac]
push ecx
mov edx, dword [ebp + 8]
add edx, 0x44
push edx
mov eax, dword [ebp + 8]
add eax, 4
push eax
mov ecx, dword [0x100316e0]
push ecx
call fcn.1000b760
add esp, 0x14
test eax, eax
je 0x1001bb58
cmp dword [0x10038c5c], 0
jne 0x1001bb94
lea edx, [ebp - 4]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x1ac]
push ecx
mov edx, dword [ebp + 8]
add edx, 0x44
push edx
mov eax, dword [ebp + 8]
add eax, 4
push eax
mov ecx, dword [0x100316e0]
push ecx
call fcn.1000b5f0
add esp, 0x14
test eax, eax
jne 0x1001bb94
mov edx, dword [ebp + 8]
add edx, 0x44
push edx
mov eax, dword [ebp + 8]
add eax, 4
push eax
mov ecx, dword [0x100316e0]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CalculateAllowedMACs._2.__08X.__08X.__08X.__08X.
push 0x100273cc
push 1
call fcn.1000eed0
add esp, 0x1c
mov dword [ebp - 0x10], 0x1776
jmp 0x1001c0ac
push 0x500
push 0
lea edx, [ebp - 0x520]
push edx
call fcn.1001ea50
add esp, 0xc
lea eax, [ebp - 0x520]
mov dword [ebp - 0x538], eax
mov ecx, dword [ebp + 0xc]
xor edx, edx
mov dl, byte [ecx]
test edx, edx
je 0x1001bfb8
mov eax, dword [ebp + 8]
add eax, 0x24ac
mov dword [ebp - 0x544], eax
mov ecx, dword [ebp + 8]
add ecx, 0x38ac
mov dword [ebp - 0x534], ecx
mov edx, dword [ebp - 0x544]
xor eax, eax
mov al, byte [edx]
test eax, eax
je 0x1001bc74
mov ecx, dword [ebp - 0x544]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.100231a0
add esp, 8
test eax, eax
jne 0x1001bc41
push 0x10
mov eax, dword [ebp - 0x538]
push eax
mov ecx, dword [ebp - 0x534]
push ecx
call fcn.1001eae0
add esp, 0xc
test eax, eax
je 0x1001bc41
push 0x10
mov edx, dword [ebp - 0x534]
push edx
mov eax, dword [ebp - 0x538]
push eax
call fcn.1001e4a0
add esp, 0xc
jmp 0x1001bc74
mov ecx, dword [ebp - 0x544]
push ecx
call fcn.1001e830
add esp, 4
mov edx, dword [ebp - 0x544]
lea eax, [edx + eax + 1]
mov dword [ebp - 0x544], eax
mov ecx, dword [ebp - 0x534]
add ecx, 0x10
mov dword [ebp - 0x534], ecx
jmp 0x1001bbe2
mov edx, dword [ebp - 0x544]
xor eax, eax
mov al, byte [edx]
test eax, eax
jne 0x1001bf8e
mov ecx, dword [ebp + 0xc]
push ecx
push str.CalculateAllowedMACs._3.__s.
push 0x100273cc
push 3
call fcn.1000eed0
add esp, 0x10
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x540], eax
cmp dword [ebp - 0x540], 0xffffffff
jne 0x1001bd07
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
add eax, 0x44
push eax
mov ecx, dword [ebp + 8]
add ecx, 4
push ecx
mov edx, dword [0x100316e0]
push edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CalculateAllowedMACs._4.__08X.__08X.__08X.__08X.
push 0x100273cc
push 1
call fcn.1000eed0
add esp, 0x1c
jmp 0x1001c0a7
mov dword [ebp - 0x554], 0
mov dword [ebp - 0x550], 0
lea eax, [ebp - 0x550]
push eax
mov ecx, dword [ebp - 0x540]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x554], eax
mov edx, dword [ebp - 0x554]
push edx
mov eax, dword [ebp - 0x550]
push eax
push str.CalculateAllowedMACs._5.__08X.__08X.
push 0x100273cc
push 3
call fcn.1000eed0
add esp, 0x14
cmp dword [ebp - 0x554], 0xffffffff
jne 0x1001bd9d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp + 8]
add ecx, 0x44
push ecx
mov edx, dword [ebp + 8]
add edx, 4
push edx
mov eax, dword [0x100316e0]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CalculateAllowedMACs._6.__08X.__08X.__08X.__08X.
push 0x100273cc
push 1
call fcn.1000eed0
add esp, 0x1c
jmp 0x1001c0a2
push 0x10
push 0
lea ecx, [ebp - 0x530]
push ecx
call fcn.1001ea50
add esp, 0xc
mov dword [ebp - 0x54c], 0
mov dword [ebp - 0x548], 0
jmp 0x1001bde4
mov edx, dword [ebp - 0x54c]
add edx, 0x10
mov eax, dword [ebp - 0x548]
adc eax, 0
mov dword [ebp - 0x54c], edx
mov dword [ebp - 0x548], eax
mov ecx, dword [ebp - 0x548]
cmp ecx, dword [ebp - 0x550]
ja 0x1001bf5f
jb 0x1001be0a
mov edx, dword [ebp - 0x54c]
cmp edx, dword [ebp - 0x554]
jae 0x1001bf5f
push 0x10
push 0
lea eax, [ebp - 0x20]
push eax
call fcn.1001ea50
add esp, 0xc
mov dword [ebp - 0x558], 0
push 0
lea ecx, [ebp - 0x558]
push ecx
push 0x10
lea edx, [ebp - 0x20]
push edx
mov eax, dword [ebp - 0x540]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1001be81
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp + 8]
add ecx, 0x44
push ecx
mov edx, dword [ebp + 8]
add edx, 4
push edx
mov eax, dword [0x100316e0]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CalculateAllowedMACs._7.__08X.__08X.__08X.__08X.
push 0x100273cc
push 1
call fcn.1000eed0
add esp, 0x1c
jmp 0x1001c09d
cmp dword [0x10038c5c], 0
je 0x1001beab
push 0x10
lea ecx, [ebp - 0x20]
push ecx
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [0x100316e0]
push ecx
call fcn.1000bbe0
add esp, 0x14
test eax, eax
je 0x1001bed1
cmp dword [0x10038c5c], 0
jne 0x1001bf10
push 0x10
lea edx, [ebp - 0x20]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [0x100316e0]
push ecx
call fcn.1000bae0
add esp, 0x10
test eax, eax
jne 0x1001bf10
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x1a4]
push eax
lea ecx, [ebp - 0x20]
push ecx
mov edx, dword [ebp - 4]
push edx
mov eax, dword [0x100316e0]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CalculateAllowedMACs._8.__08X.__08X.__08X.__08X.__08X.
push 0x100273cc
push 1
call fcn.1000eed0
add esp, 0x20
mov dword [ebp - 0x10], 0x1770
jmp 0x1001c098
mov dword [ebp - 0x558], 0
jmp 0x1001bf2b
mov ecx, dword [ebp - 0x558]
add ecx, 1
mov dword [ebp - 0x558], ecx
cmp dword [ebp - 0x558], 0x10
jae 0x1001bf5a
mov edx, dword [ebp - 0x558]
mov eax, dword [ebp - 0x558]
mov cl, byte [ebp + edx - 0x530]
xor cl, byte [ebp + eax - 0x20]
mov edx, dword [ebp - 0x558]
mov byte [ebp + edx - 0x530], cl
jmp 0x1001bf1c
jmp 0x1001bdc6
mov eax, dword [ebp - 0x540]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x540], 0xffffffff
push 0x10
lea ecx, [ebp - 0x530]
push ecx
mov edx, dword [ebp - 0x538]
push edx
call fcn.1001e4a0
add esp, 0xc
mov eax, dword [ebp + 0xc]
push eax
call fcn.1001e830
add esp, 4
mov ecx, dword [ebp + 0xc]
lea edx, [ecx + eax + 1]
mov dword [ebp + 0xc], edx
mov eax, dword [ebp - 0x538]
add eax, 0x10
mov dword [ebp - 0x538], eax
jmp 0x1001bbb6
push 0x500
push 0
mov ecx, dword [ebp + 8]
add ecx, 0x38ac
push ecx
call fcn.1001ea50
add esp, 0xc
push 0x500
lea edx, [ebp - 0x520]
push edx
mov eax, dword [ebp + 8]
add eax, 0x38ac
push eax
call fcn.1001e4a0
add esp, 0xc
mov dword [ebp - 0x53c], 1
jmp 0x1001c093
mov dword [ebp - 0x53c], 0
cmp dword [ebp - 0x540], 0xffffffff
je 0x1001c01d
mov ecx, dword [ebp - 0x540]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 4], 0
jne 0x1001c02d
mov edx, dword [ebp - 0xc]
or edx, dword [ebp - 8]
test edx, edx
je 0x1001c062
cmp dword [0x10038c5c], 0
je 0x1001c04f
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [0x100316e0]
push edx
call fcn.1000b9e0
add esp, 0xc
jmp 0x1001c062
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [0x100316e0]
push ecx
call fcn.1000b8f0
add esp, 8
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x53c]
push eax
push str.CalculateAllowedMACs._9.__08X.__08X.
push 0x100273cc
push 3
call fcn.1000eed0
add esp, 0x14
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x53c]
jmp 0x1001c0b1
jmp 0x1001c007
jmp 0x1001bffd
jmp 0x1001bffd
jmp 0x1001bffd
jmp 0x1001bffd
jmp 0x1001bffd
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8