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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x444
mov eax, dword [ebp + 8]
push eax
call fcn.1000ef40
add esp, 4
test eax, eax
jbe 0x100050b4
mov ecx, dword [ebp + 8]
push ecx
call fcn.1000ef40
add esp, 4
cmp eax, 8
jbe 0x100050be
mov eax, 0x3ea
jmp 0x1000553a
cmp dword [ebp + 0xc], 1
jl 0x100050ca
cmp dword [ebp + 0xc], 7
jle 0x100050d4
mov eax, 0x3ea
jmp 0x1000553a
cmp dword [ebp + 0x10], 0
je 0x100050ea
cmp dword [ebp + 0x10], 1
je 0x100050ea
mov eax, 0x3ea
jmp 0x1000553a
mov edx, dword [ebp + 0x14]
push edx
call fcn.1000ef40
add esp, 4
test eax, eax
ja 0x10005104
mov eax, 0x3ea
jmp 0x1000553a
mov dword [0x10024b1c], 1
mov dword [0x10029b24], 1
push 0x11
push 0
lea eax, [ebp - 0x28]
push eax
call fcn.1000f350
add esp, 0xc
cmp dword [ebp + 0x10], 0
setne cl
add ecx, 0x41
mov byte [ebp - 0xc], cl
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x440], edx
mov eax, dword [ebp - 0x440]
sub eax, 1
mov dword [ebp - 0x440], eax
cmp dword [ebp - 0x440], 6
ja case.default.0x1000515c
mov ecx, dword [ebp - 0x440]
jmp dword [ecx*4 + 0x10005540]
mov byte [ebp - 0x438], 0x66
jmp case.default.0x1000515c
mov byte [ebp - 0x438], 0x42
jmp case.default.0x1000515c
mov byte [ebp - 0x438], 0x62
jmp case.default.0x1000515c
mov byte [ebp - 0x438], 0x49
jmp case.default.0x1000515c
mov byte [ebp - 0x438], 0x69
jmp case.default.0x1000515c
mov byte [ebp - 0x438], 0x50
jmp case.default.0x1000515c
mov byte [ebp - 0x438], 0x70
push 0xd
mov edx, dword [ebp + 8]
push edx
movsx eax, byte [ebp - 0x438]
push eax
movsx ecx, byte [ebp - 0xc]
push ecx
push 2
push 1
push str._cD_cI_c_c_s_c_
lea edx, [ebp - 0x28]
push edx
call fcn.1000f2f5
add esp, 0x20
mov eax, dword [0x1001fb18]
push eax
lea ecx, [ebp - 0x28]
push ecx
call fcn.1000ef40
add esp, 4
push eax
lea edx, [ebp - 0x28]
push edx
call fcn.100021c0
add esp, 0xc
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0x3e8
je 0x100051fb
mov eax, dword [ebp - 0x2c]
jmp 0x1000553a
push 0
push 0
push 3
push 0
push 0
push bind
mov eax, dword [ebp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x43c], eax
cmp dword [ebp - 0x43c], 0xffffffff
jne 0x1000522d
mov eax, 0x3eb
jmp 0x1000553a
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x444], ecx
mov edx, dword [ebp - 0x444]
sub edx, 2
mov dword [ebp - 0x444], edx
cmp dword [ebp - 0x444], 3
ja case.default.0x10005258
mov eax, dword [ebp - 0x444]
jmp dword [eax*4 + 0x1000555c]
push 0xe
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x10], eax
push 0
lea ecx, [ebp - 4]
push ecx
push 0xe
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x43c]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 4], 0xe
je 0x100052ac
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edx, dword [ebp - 0x43c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x3ec
jmp 0x1000553a
mov eax, dword [ebp - 0x10]
xor ecx, ecx
mov cx, word [eax]
cmp ecx, 0x4d42
je 0x100052dd
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x43c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x3f0
jmp 0x1000553a
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp case.default.0x10005258
push 0x10
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 8], eax
push 0
lea edx, [ebp - 4]
push edx
push 0x10
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 0x43c]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 4], 0x10
je 0x10005339
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x43c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x3ec
jmp 0x1000553a
mov ecx, dword [ebp - 8]
xor edx, edx
mov dl, byte [ecx]
test edx, edx
jne 0x1000538f
mov eax, dword [ebp - 8]
xor ecx, ecx
mov cl, byte [eax + 1]
cmp ecx, 1
jne 0x1000538f
mov edx, dword [ebp - 8]
xor eax, eax
mov al, byte [edx + 2]
test eax, eax
jne 0x1000538f
mov ecx, dword [ebp - 8]
xor edx, edx
mov dl, byte [ecx]
cmp edx, 8
je 0x10005376
mov eax, dword [ebp - 8]
xor ecx, ecx
mov cl, byte [eax + 3]
cmp ecx, 8
jne 0x1000538f
mov edx, dword [ebp - 8]
xor eax, eax
mov al, byte [edx + 4]
test eax, eax
jne 0x1000538f
mov ecx, dword [ebp - 8]
xor edx, edx
mov dl, byte [ecx + 5]
cmp edx, 1
je 0x100053b0
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebp - 0x43c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x3f0
jmp 0x1000553a
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 0
push 0
push 0
mov eax, dword [ebp - 0x43c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea ecx, [ebp - 0x34]
push ecx
mov edx, dword [ebp - 0x43c]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x30], 0
jmp 0x100053f3
mov eax, dword [ebp - 0x30]
add eax, 1
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x14]
shr ecx, 0xa
cmp dword [ebp - 0x30], ecx
jae 0x1000547d
push 0
lea edx, [ebp - 4]
push edx
push 0x400
lea eax, [ebp - 0x434]
push eax
mov ecx, dword [ebp - 0x43c]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 4], 0x400
je 0x1000543d
mov edx, dword [ebp - 0x43c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x3ec
jmp 0x1000553a
mov eax, dword [0x1001fb18]
push eax
push 0x400
lea ecx, [ebp - 0x434]
push ecx
call fcn.100021c0
add esp, 0xc
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0x3e8
je 0x10005478
mov edx, dword [ebp - 0x43c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x2c]
jmp 0x1000553a
jmp 0x100053ea
push 0
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp - 0x14]
xor edx, edx
mov ecx, 0x400
div ecx
push edx
lea edx, [ebp - 0x434]
push edx
mov eax, dword [ebp - 0x43c]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x14]
xor edx, edx
mov ecx, 0x400
div ecx
cmp dword [ebp - 4], edx
je 0x100054c9
mov edx, dword [ebp - 0x43c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x3ec
jmp 0x1000553a
mov eax, dword [0x1001fb18]
push eax
mov ecx, dword [ebp - 4]
push ecx
lea edx, [ebp - 0x434]
push edx
call fcn.100021c0
add esp, 0xc
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0x3e8
je 0x10005500
mov eax, dword [ebp - 0x43c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x2c]
jmp 0x1000553a
mov ecx, dword [ebp - 0x43c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 2
push 0x1001c348
lea edx, [ebp - 0x28]
push edx
call fcn.1000f2f5
add esp, 0xc
mov eax, dword [0x1001fb18]
push eax
push 2
lea ecx, [ebp - 0x28]
push ecx
call fcn.100021c0
add esp, 0xc
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
mov esp, ebp
pop ebp
ret 0x10