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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c6f81
mov eax, dword fs:[0]
push eax
sub esp, 0x43c
mov eax, dword [0x4ebfe0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x444], ecx
cmp dword [ebp + 8], 0
je 0x484717
mov eax, dword [ebp + 8]
push eax
call fcn.004a8f5f
add esp, 4
test eax, eax
jne 0x48471e
xor al, al
jmp 0x485443
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x444]
add ecx, 0x384
call fcn.00428240
mov edx, dword [ebp - 0x444]
add edx, 0x384
push edx
mov ecx, dword [ebp - 0x444]
add ecx, 0x408
call fcn.00428210
mov dword [ebp - 0xa8], 0
lea ecx, [ebp - 0x134]
call fcn.00427eb0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x9c]
call fcn.00427eb0
mov byte [ebp - 4], 1
mov dword [ebp - 0xac], 0
mov ecx, dword [ebp - 0x444]
add ecx, 0x384
call fcn.004281e0
mov dword [ebp - 0x13c], eax
mov eax, dword [ebp - 0x13c]
movzx ecx, word [eax]
test ecx, ecx
je 0x484e9c
lea ecx, [ebp - 0x134]
call fcn.004281a0
lea ecx, [ebp - 0x9c]
call fcn.004281a0
mov edx, dword [ebp - 0x13c]
movzx eax, word [edx]
test eax, eax
jle 0x4847f4
mov ecx, dword [ebp - 0x13c]
movzx edx, word [ecx]
cmp edx, 0x20
jg 0x4847f4
mov eax, dword [ebp - 0x13c]
push eax
call dword [sym.imp.USER32.dll_CharNextW]
mov dword [ebp - 0x13c], eax
jmp 0x4847c4
mov ecx, dword [ebp - 0x13c]
movzx edx, word [ecx]
test edx, edx
je 0x484874
mov eax, dword [ebp - 0x13c]
movzx ecx, word [eax]
cmp ecx, 0x3d
je 0x484874
mov edx, dword [ebp - 0x13c]
movzx eax, word [edx]
cmp eax, 0x20
jle 0x484874
mov ecx, dword [ebp - 0x13c]
push ecx
call dword [sym.imp.USER32.dll_CharNextW]
mov dword [ebp - 0x140], eax
mov edx, dword [ebp - 0x13c]
cmp edx, dword [ebp - 0x140]
jae 0x484872
mov eax, dword [ebp - 0x13c]
mov cx, word [eax]
mov word [ebp - 0x446], cx
movzx edx, word [ebp - 0x446]
push edx
lea ecx, [ebp - 0x134]
call fcn.004282d0
mov eax, dword [ebp - 0x13c]
add eax, 2
mov dword [ebp - 0x13c], eax
jmp 0x484830
jmp 0x4847f4
mov ecx, dword [ebp - 0x13c]
movzx edx, word [ecx]
test edx, edx
jle 0x4848a4
mov eax, dword [ebp - 0x13c]
movzx ecx, word [eax]
cmp ecx, 0x20
jg 0x4848a4
mov edx, dword [ebp - 0x13c]
push edx
call dword [sym.imp.USER32.dll_CharNextW]
mov dword [ebp - 0x13c], eax
jmp 0x484874
mov eax, dword [ebp - 0x13c]
movzx ecx, word [eax]
mov edx, dword [ebp - 0x13c]
add edx, 2
mov dword [ebp - 0x13c], edx
cmp ecx, 0x3d
je 0x4848c6
jmp 0x484e9c
mov eax, dword [ebp - 0x13c]
movzx ecx, word [eax]
test ecx, ecx
jle 0x4848f6
mov edx, dword [ebp - 0x13c]
movzx eax, word [edx]
cmp eax, 0x20
jg 0x4848f6
mov ecx, dword [ebp - 0x13c]
push ecx
call dword [sym.imp.USER32.dll_CharNextW]
mov dword [ebp - 0x13c], eax
jmp 0x4848c6
mov edx, dword [ebp - 0x13c]
movzx eax, word [edx]
mov ecx, dword [ebp - 0x13c]
add ecx, 2
mov dword [ebp - 0x13c], ecx
cmp eax, 0x27
je 0x484918
jmp 0x484e9c
mov edx, dword [ebp - 0x13c]
movzx eax, word [edx]
test eax, eax
je 0x48498a
mov ecx, dword [ebp - 0x13c]
movzx edx, word [ecx]
cmp edx, 0x27
je 0x48498a
mov eax, dword [ebp - 0x13c]
push eax
call dword [sym.imp.USER32.dll_CharNextW]
mov dword [ebp - 0x144], eax
mov ecx, dword [ebp - 0x13c]
cmp ecx, dword [ebp - 0x144]
jae 0x484988
mov edx, dword [ebp - 0x13c]
mov ax, word [edx]
mov word [ebp - 0x448], ax
movzx ecx, word [ebp - 0x448]
push ecx
lea ecx, [ebp - 0x9c]
call fcn.004282d0
mov edx, dword [ebp - 0x13c]
add edx, 2
mov dword [ebp - 0x13c], edx
jmp 0x484946
jmp 0x484918
mov eax, dword [ebp - 0x13c]
movzx ecx, word [eax]
mov edx, dword [ebp - 0x13c]
add edx, 2
mov dword [ebp - 0x13c], edx
cmp ecx, 0x27
je 0x4849ac
jmp 0x484e9c
lea ecx, [ebp - 0x9c]
call fcn.00428180
movzx eax, al
test eax, eax
jne 0x484e78
push 0x4ce684
lea ecx, [ebp - 0x134]
call fcn.004281e0
push eax
call fcn.004a856e
add esp, 8
neg eax
sbb eax, eax
add eax, 1
movzx ecx, al
test ecx, ecx
je 0x484a06
lea edx, [ebp - 0x9c]
push edx
mov ecx, dword [ebp - 0x444]
add ecx, 0x408
call fcn.00428210
jmp 0x484e78
push str.dest
lea ecx, [ebp - 0x134]
call fcn.004281e0
push eax
call fcn.004a856e
add esp, 8
neg eax
sbb eax, eax
add eax, 1
movzx eax, al
test eax, eax
je 0x484ad4
push 0xa
lea ecx, [ebp - 0xac]
push ecx
lea ecx, [ebp - 0x9c]
call fcn.004281e0
push eax
call fcn.004a8b8d
add esp, 0xc
mov edx, dword [ebp - 0x444]
mov dword [edx + 0x494], eax
push 0xa
lea eax, [ebp - 0xac]
push eax
mov ecx, dword [ebp - 0xac]
add ecx, 2
push ecx
call fcn.004a8b8d
add esp, 0xc
mov edx, dword [ebp - 0x444]
mov dword [edx + 0x498], eax
push 0xa
lea eax, [ebp - 0xac]
push eax
mov ecx, dword [ebp - 0xac]
add ecx, 2
push ecx
call fcn.004a8b8d
add esp, 0xc
mov edx, dword [ebp - 0x444]
mov dword [edx + 0x49c], eax
push 0xa
lea eax, [ebp - 0xac]
push eax
mov ecx, dword [ebp - 0xac]
add ecx, 2
push ecx
call fcn.004a8b8d
add esp, 0xc
mov edx, dword [ebp - 0x444]
mov dword [edx + 0x4a0], eax
jmp 0x484e78
push str.source
lea ecx, [ebp - 0x134]
call fcn.004281e0
push eax
call fcn.004a856e
add esp, 8
neg eax
sbb eax, eax
add eax, 1
movzx eax, al
test eax, eax
je 0x484ba2
push 0xa
lea ecx, [ebp - 0xac]
push ecx
lea ecx, [ebp - 0x9c]
call fcn.004281e0
push eax
call fcn.004a8b8d
add esp, 0xc
mov edx, dword [ebp - 0x444]
mov dword [edx + 0x4a4], eax
push 0xa
lea eax, [ebp - 0xac]
push eax
mov ecx, dword [ebp - 0xac]
add ecx, 2
push ecx
call fcn.004a8b8d
add esp, 0xc
mov edx, dword [ebp - 0x444]
mov dword [edx + 0x4a8], eax
push 0xa
lea eax, [ebp - 0xac]
push eax
mov ecx, dword [ebp - 0xac]
add ecx, 2
push ecx
call fcn.004a8b8d
add esp, 0xc
mov edx, dword [ebp - 0x444]
mov dword [edx + 0x4ac], eax
push 0xa
lea eax, [ebp - 0xac]
push eax
mov ecx, dword [ebp - 0xac]
add ecx, 2
push ecx
call fcn.004a8b8d
add esp, 0xc
mov edx, dword [ebp - 0x444]
mov dword [edx + 0x4b0], eax
jmp 0x484e78
push str.corner
lea ecx, [ebp - 0x134]
call fcn.004281e0
push eax
call fcn.004a856e
add esp, 8
neg eax
sbb eax, eax
add eax, 1
movzx eax, al
test eax, eax
jne 0x484bf4
push str.scale9
lea ecx, [ebp - 0x134]
call fcn.004281e0
push eax
call fcn.004a856e
add esp, 8
neg eax
sbb eax, eax
add eax, 1
movzx ecx, al
test ecx, ecx
je 0x484c97
push 0xa
lea edx, [ebp - 0xac]
push edx
lea ecx, [ebp - 0x9c]
call fcn.004281e0
push eax
call fcn.004a8b8d
add esp, 0xc
mov ecx, dword [ebp - 0x444]
mov dword [ecx + 0x4b4], eax
push 0xa
lea edx, [ebp - 0xac]
push edx
mov eax, dword [ebp - 0xac]
add eax, 2
push eax
call fcn.004a8b8d
add esp, 0xc
mov ecx, dword [ebp - 0x444]
mov dword [ecx + 0x4b8], eax
push 0xa
lea edx, [ebp - 0xac]
push edx
mov eax, dword [ebp - 0xac]
add eax, 2
push eax
call fcn.004a8b8d
add esp, 0xc
mov ecx, dword [ebp - 0x444]
mov dword [ecx + 0x4bc], eax
push 0xa
lea edx, [ebp - 0xac]
push edx
mov eax, dword [ebp - 0xac]
add eax, 2
push eax
call fcn.004a8b8d
add esp, 0xc
mov ecx, dword [ebp - 0x444]
mov dword [ecx + 0x4c0], eax
jmp 0x484e78
push str.mask
lea ecx, [ebp - 0x134]
call fcn.004281e0
push eax
call fcn.004a856e
add esp, 8
neg eax
sbb eax, eax
add eax, 1
movzx edx, al
test edx, edx
je 0x484d23
push 0
lea ecx, [ebp - 0x9c]
call fcn.004281f0
movzx eax, ax
cmp eax, 0x23
jne 0x484cfb
push 0x10
lea ecx, [ebp - 0xac]
push ecx
lea ecx, [ebp - 0x9c]
call fcn.004281e0
add eax, 2
push eax
call fcn.004a8bb8
add esp, 0xc
mov dword [ebp - 0xa8], eax
jmp 0x484d1e
push 0x10
lea edx, [ebp - 0xac]
push edx
lea ecx, [ebp - 0x9c]
call fcn.004281e0
push eax
call fcn.004a8bb8
add esp, 0xc
mov dword [ebp - 0xa8], eax
jmp 0x484e78
push str.fade
lea ecx, [ebp - 0x134]
call fcn.004281e0
push eax
call fcn.004a856e
add esp, 8
neg eax
sbb eax, eax
add eax, 1
movzx eax, al
test eax, eax
je 0x484d78
push 0xa
lea ecx, [ebp - 0xac]
push ecx
lea ecx, [ebp - 0x9c]
call fcn.004281e0
push eax
call fcn.004a8bb8
add esp, 0xc
mov edx, dword [ebp - 0x444]
mov byte [edx + 0x4c4], al
jmp 0x484e78
push str.hole
lea ecx, [ebp - 0x134]
call fcn.004281e0
push eax
call fcn.004a856e
add esp, 8
neg eax
sbb eax, eax
add eax, 1
movzx eax, al
test eax, eax
je 0x484dd0
push 0x4cb960
lea ecx, [ebp - 0x9c]
call fcn.004281e0
push eax
call fcn.004a856e
add esp, 8
neg eax
sbb eax, eax
add eax, 1
mov ecx, dword [ebp - 0x444]
mov byte [ecx + 0x4c5], al
jmp 0x484e78
push str.xtiled
lea ecx, [ebp - 0x134]
call fcn.004281e0
push eax
call fcn.004a856e
add esp, 8
neg eax
sbb eax, eax
add eax, 1
movzx edx, al
test edx, edx
je 0x484e25
push 0x4cb960
lea ecx, [ebp - 0x9c]
call fcn.004281e0
push eax
call fcn.004a856e
add esp, 8
neg eax
sbb eax, eax
add eax, 1
mov ecx, dword [ebp - 0x444]
mov byte [ecx + 0x4c6], al
jmp 0x484e78
push str.ytiled
lea ecx, [ebp - 0x134]
call fcn.004281e0
push eax
call fcn.004a856e
add esp, 8
neg eax
sbb eax, eax
add eax, 1
movzx edx, al
test edx, edx
je 0x484e78
push 0x4cb960
lea ecx, [ebp - 0x9c]
call fcn.004281e0
push eax
call fcn.004a856e
add esp, 8
neg eax
sbb eax, eax
add eax, 1
mov ecx, dword [ebp - 0x444]
mov byte [ecx + 0x4c7], al
mov edx, dword [ebp - 0x13c]
movzx eax, word [edx]
mov ecx, dword [ebp - 0x13c]
add ecx, 2
mov dword [ebp - 0x13c], ecx
cmp eax, 0x20
je 0x484e97
jmp 0x484e9c
jmp 0x48479d
mov dword [ebp - 0xa0], 0
mov dword [ebp - 0xa4], 0
call fcn.0041cb40
push eax
lea ecx, [ebp - 0x1cc]
call fcn.00427f20
mov byte [ebp - 4], 2
call fcn.0041cb50
mov ecx, eax
call fcn.00428180
movzx edx, al
test edx, edx
je 0x485033
mov eax, dword [ebp - 0x444]
add eax, 0x408
push eax
lea ecx, [ebp - 0x1cc]
call fcn.00428270
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
lea ecx, [ebp - 0x1cc]
call fcn.004281e0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x1d0], eax
cmp dword [ebp - 0x1d0], 0xffffffff
jne 0x484f3a
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1cc]
call fcn.00427f60
jmp 0x4851f9
push 0
mov ecx, dword [ebp - 0x1d0]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0xa4], eax
cmp dword [ebp - 0xa4], 0
jne 0x484f79
mov edx, dword [ebp - 0x1d0]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1cc]
call fcn.00427f60
jmp 0x4851f9
mov dword [ebp - 0x1d4], 0
mov eax, dword [ebp - 0xa4]
add eax, 1
push eax
call fcn.0041bd2c
add esp, 4
mov dword [ebp - 0x420], eax
mov ecx, dword [ebp - 0x420]
mov dword [ebp - 0xa0], ecx
mov edx, dword [ebp - 0xa0]
add edx, dword [ebp - 0xa4]
mov byte [edx], 0
push 0
lea eax, [ebp - 0x1d4]
push eax
mov ecx, dword [ebp - 0xa4]
push ecx
mov edx, dword [ebp - 0xa0]
push edx
mov eax, dword [ebp - 0x1d0]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 0x1d0]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x1d4]
cmp edx, dword [ebp - 0xa4]
je 0x48502e
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0x424], eax
mov ecx, dword [ebp - 0x424]
push ecx
call fcn.004a69ed
add esp, 4
mov dword [ebp - 0xa0], 0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1cc]
call fcn.00427f60
jmp 0x4851f9
jmp 0x4851e2
call fcn.0041cb50
push eax
lea ecx, [ebp - 0x1cc]
call fcn.00428270
mov dword [ebp - 0x1dc], 0
call fcn.0041cb60
movzx edx, al
test edx, edx
je 0x485067
call fcn.0041cb70
mov dword [ebp - 0x1dc], eax
jmp 0x485087
call fcn.0041cb80
push eax
lea ecx, [ebp - 0x1cc]
call fcn.004281e0
push eax
call fcn.0041a6f0
add esp, 8
mov dword [ebp - 0x1dc], eax
cmp dword [ebp - 0x1dc], 0
jne 0x4850a4
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1cc]
call fcn.00427f60
jmp 0x4851f9
lea eax, [ebp - 0x414]
push eax
lea ecx, [ebp - 0x1e0]
push ecx
push 1
mov ecx, dword [ebp - 0x444]
add ecx, 0x408
call fcn.004281e0
push eax
mov edx, dword [ebp - 0x1dc]
push edx
call fcn.0041a7c0
add esp, 0x14
test eax, eax
je 0x4850ed
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1cc]
call fcn.00427f60
jmp 0x4851f9
mov eax, dword [ebp - 0x1e8]
mov dword [ebp - 0xa4], eax
cmp dword [ebp - 0xa4], 0
jne 0x485116
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1cc]
call fcn.00427f60
jmp 0x4851f9
mov ecx, dword [ebp - 0xa4]
push ecx
call fcn.0041bd2c
add esp, 4
mov dword [ebp - 0x428], eax
mov edx, dword [ebp - 0x428]
mov dword [ebp - 0xa0], edx
mov eax, dword [ebp - 0xa4]
push eax
mov ecx, dword [ebp - 0xa0]
push ecx
mov edx, dword [ebp - 0x1e0]
push edx
mov eax, dword [ebp - 0x1dc]
push eax
call fcn.0041a8c0
add esp, 0x10
mov dword [ebp - 0x1d8], eax
cmp dword [ebp - 0x1d8], 0
je 0x4851c7
cmp dword [ebp - 0x1d8], 0x600
je 0x4851c7
mov ecx, dword [ebp - 0xa0]
mov dword [ebp - 0x42c], ecx
mov edx, dword [ebp - 0x42c]
push edx
call fcn.004a69ed
add esp, 4
mov dword [ebp - 0xa0], 0
call fcn.0041cb60
movzx eax, al
test eax, eax
jne 0x4851b6
mov ecx, dword [ebp - 0x1dc]
push ecx
call fcn.0041a940
add esp, 4
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1cc]
call fcn.00427f60
jmp 0x4851f9
call fcn.0041cb60
movzx edx, al
test edx, edx
jne 0x4851e2
mov eax, dword [ebp - 0x1dc]
push eax
call fcn.0041a940
add esp, 4
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1cc]
call fcn.00427f60
xor ecx, ecx
jne 0x484eb0
cmp dword [ebp - 0xa0], 0
jne 0x48531c
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
mov ecx, dword [ebp - 0x444]
add ecx, 0x408
call fcn.004281e0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x418], eax
cmp dword [ebp - 0x418], 0xffffffff
jne 0x485244
jmp 0x48531c
push 0
mov edx, dword [ebp - 0x418]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0xa4], eax
cmp dword [ebp - 0xa4], 0
jne 0x485274
mov eax, dword [ebp - 0x418]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x48531c
mov dword [ebp - 0x41c], 0
mov ecx, dword [ebp - 0xa4]
add ecx, 1
push ecx
call fcn.0041bd2c
add esp, 4
mov dword [ebp - 0x430], eax
mov edx, dword [ebp - 0x430]
mov dword [ebp - 0xa0], edx
mov eax, dword [ebp - 0xa0]
add eax, dword [ebp - 0xa4]
mov byte [eax], 0
push 0
lea ecx, [ebp - 0x41c]
push ecx
mov edx, dword [ebp - 0xa4]
push edx
mov eax, dword [ebp - 0xa0]
push eax
mov ecx, dword [ebp - 0x418]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 0x418]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x41c]
cmp eax, dword [ebp - 0xa4]
je 0x485315
mov ecx, dword [ebp - 0xa0]
mov dword [ebp - 0x434], ecx
mov edx, dword [ebp - 0x434]
push edx
call fcn.004a69ed
add esp, 4
mov dword [ebp - 0xa0], 0
jmp 0x48531c
cmp dword [ebp - 0xa0], 0
jne 0x485358
mov byte [ebp - 0x435], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x9c]
call fcn.00427f60
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x134]
call fcn.00427f60
mov al, byte [ebp - 0x435]
jmp 0x485443
mov eax, dword [ebp - 0xa8]
push eax
mov ecx, dword [ebp - 0xa4]
push ecx
mov edx, dword [ebp - 0xa0]
push edx
mov eax, dword [ebp - 0x444]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x444]
mov eax, dword [edx + 0x190]
call eax
mov byte [ebp - 0x135], al
mov ecx, dword [ebp - 0xa0]
mov dword [ebp - 0x43c], ecx
mov edx, dword [ebp - 0x43c]
push edx
call fcn.004a69ed
add esp, 4
mov eax, dword [ebp - 0x444]
cmp dword [eax + 0x4a4], 0
jne 0x485410
mov ecx, dword [ebp - 0x444]
cmp dword [ecx + 0x4ac], 0
jne 0x485410
mov edx, dword [ebp - 0x444]
cmp dword [edx + 0x4a8], 0
jne 0x485410
mov eax, dword [ebp - 0x444]
cmp dword [eax + 0x4b0], 0
jne 0x485410
mov ecx, dword [ebp - 0x444]
mov edx, dword [ebp - 0x444]
mov eax, dword [edx + 0x6e0]
mov dword [ecx + 0x4ac], eax
mov ecx, dword [ebp - 0x444]
mov edx, dword [ebp - 0x444]
mov eax, dword [edx + 0x6e4]
mov dword [ecx + 0x4b0], eax
mov cl, byte [ebp - 0x135]
mov byte [ebp - 0x43d], cl
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x9c]
call fcn.00427f60
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x134]
call fcn.00427f60
mov al, byte [ebp - 0x43d]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a4ea6
mov esp, ebp
pop ebp
ret 4