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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b0491
mov eax, dword fs:[0]
push eax
sub esp, 0x43c
mov eax, dword [0x4d0c20]
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 0x4811a7
mov eax, dword [ebp + 8]
push eax
call fcn.0049605f
add esp, 4
test eax, eax
jne 0x4811ae
xor al, al
jmp 0x481ed3
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x444]
add ecx, 0x384
call fcn.00424ed0
mov edx, dword [ebp - 0x444]
add edx, 0x384
push edx
mov ecx, dword [ebp - 0x444]
add ecx, 0x408
call fcn.00424ea0
mov dword [ebp - 0xa8], 0
lea ecx, [ebp - 0x134]
call fcn.00424b40
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x9c]
call fcn.00424b40
mov byte [ebp - 4], 1
mov dword [ebp - 0xac], 0
mov ecx, dword [ebp - 0x444]
add ecx, 0x384
call fcn.00424e70
mov dword [ebp - 0x13c], eax
mov eax, dword [ebp - 0x13c]
movzx ecx, word [eax]
test ecx, ecx
je 0x48192c
lea ecx, [ebp - 0x134]
call fcn.00424e30
lea ecx, [ebp - 0x9c]
call fcn.00424e30
mov edx, dword [ebp - 0x13c]
movzx eax, word [edx]
test eax, eax
jle 0x481284
mov ecx, dword [ebp - 0x13c]
movzx edx, word [ecx]
cmp edx, 0x20
jg 0x481284
mov eax, dword [ebp - 0x13c]
push eax
call dword [sym.imp.USER32.dll_CharNextW]
mov dword [ebp - 0x13c], eax
jmp 0x481254
mov ecx, dword [ebp - 0x13c]
movzx edx, word [ecx]
test edx, edx
je 0x481304
mov eax, dword [ebp - 0x13c]
movzx ecx, word [eax]
cmp ecx, 0x3d
je 0x481304
mov edx, dword [ebp - 0x13c]
movzx eax, word [edx]
cmp eax, 0x20
jle 0x481304
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 0x481302
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.00424f60
mov eax, dword [ebp - 0x13c]
add eax, 2
mov dword [ebp - 0x13c], eax
jmp 0x4812c0
jmp 0x481284
mov ecx, dword [ebp - 0x13c]
movzx edx, word [ecx]
test edx, edx
jle 0x481334
mov eax, dword [ebp - 0x13c]
movzx ecx, word [eax]
cmp ecx, 0x20
jg 0x481334
mov edx, dword [ebp - 0x13c]
push edx
call dword [sym.imp.USER32.dll_CharNextW]
mov dword [ebp - 0x13c], eax
jmp 0x481304
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 0x481356
jmp 0x48192c
mov eax, dword [ebp - 0x13c]
movzx ecx, word [eax]
test ecx, ecx
jle 0x481386
mov edx, dword [ebp - 0x13c]
movzx eax, word [edx]
cmp eax, 0x20
jg 0x481386
mov ecx, dword [ebp - 0x13c]
push ecx
call dword [sym.imp.USER32.dll_CharNextW]
mov dword [ebp - 0x13c], eax
jmp 0x481356
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 0x4813a8
jmp 0x48192c
mov edx, dword [ebp - 0x13c]
movzx eax, word [edx]
test eax, eax
je 0x48141a
mov ecx, dword [ebp - 0x13c]
movzx edx, word [ecx]
cmp edx, 0x27
je 0x48141a
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 0x481418
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.00424f60
mov edx, dword [ebp - 0x13c]
add edx, 2
mov dword [ebp - 0x13c], edx
jmp 0x4813d6
jmp 0x4813a8
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 0x48143c
jmp 0x48192c
lea ecx, [ebp - 0x9c]
call fcn.00424e10
movzx eax, al
test eax, eax
jne 0x481908
push 0x4b6644
lea ecx, [ebp - 0x134]
call fcn.00424e70
push eax
call fcn.0049566d
add esp, 8
neg eax
sbb eax, eax
add eax, 1
movzx ecx, al
test ecx, ecx
je 0x481496
lea edx, [ebp - 0x9c]
push edx
mov ecx, dword [ebp - 0x444]
add ecx, 0x408
call fcn.00424ea0
jmp 0x481908
push str.dest
lea ecx, [ebp - 0x134]
call fcn.00424e70
push eax
call fcn.0049566d
add esp, 8
neg eax
sbb eax, eax
add eax, 1
movzx eax, al
test eax, eax
je 0x481564
push 0xa
lea ecx, [ebp - 0xac]
push ecx
lea ecx, [ebp - 0x9c]
call fcn.00424e70
push eax
call fcn.00495c8d
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.00495c8d
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.00495c8d
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.00495c8d
add esp, 0xc
mov edx, dword [ebp - 0x444]
mov dword [edx + 0x4a0], eax
jmp 0x481908
push str.source
lea ecx, [ebp - 0x134]
call fcn.00424e70
push eax
call fcn.0049566d
add esp, 8
neg eax
sbb eax, eax
add eax, 1
movzx eax, al
test eax, eax
je 0x481632
push 0xa
lea ecx, [ebp - 0xac]
push ecx
lea ecx, [ebp - 0x9c]
call fcn.00424e70
push eax
call fcn.00495c8d
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.00495c8d
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.00495c8d
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.00495c8d
add esp, 0xc
mov edx, dword [ebp - 0x444]
mov dword [edx + 0x4b0], eax
jmp 0x481908
push str.corner
lea ecx, [ebp - 0x134]
call fcn.00424e70
push eax
call fcn.0049566d
add esp, 8
neg eax
sbb eax, eax
add eax, 1
movzx eax, al
test eax, eax
jne 0x481684
push str.scale9
lea ecx, [ebp - 0x134]
call fcn.00424e70
push eax
call fcn.0049566d
add esp, 8
neg eax
sbb eax, eax
add eax, 1
movzx ecx, al
test ecx, ecx
je 0x481727
push 0xa
lea edx, [ebp - 0xac]
push edx
lea ecx, [ebp - 0x9c]
call fcn.00424e70
push eax
call fcn.00495c8d
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.00495c8d
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.00495c8d
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.00495c8d
add esp, 0xc
mov ecx, dword [ebp - 0x444]
mov dword [ecx + 0x4c0], eax
jmp 0x481908
push str.mask
lea ecx, [ebp - 0x134]
call fcn.00424e70
push eax
call fcn.0049566d
add esp, 8
neg eax
sbb eax, eax
add eax, 1
movzx edx, al
test edx, edx
je 0x4817b3
push 0
lea ecx, [ebp - 0x9c]
call fcn.00424e80
movzx eax, ax
cmp eax, 0x23
jne 0x48178b
push 0x10
lea ecx, [ebp - 0xac]
push ecx
lea ecx, [ebp - 0x9c]
call fcn.00424e70
add eax, 2
push eax
call fcn.00495cb8
add esp, 0xc
mov dword [ebp - 0xa8], eax
jmp 0x4817ae
push 0x10
lea edx, [ebp - 0xac]
push edx
lea ecx, [ebp - 0x9c]
call fcn.00424e70
push eax
call fcn.00495cb8
add esp, 0xc
mov dword [ebp - 0xa8], eax
jmp 0x481908
push str.fade
lea ecx, [ebp - 0x134]
call fcn.00424e70
push eax
call fcn.0049566d
add esp, 8
neg eax
sbb eax, eax
add eax, 1
movzx eax, al
test eax, eax
je 0x481808
push 0xa
lea ecx, [ebp - 0xac]
push ecx
lea ecx, [ebp - 0x9c]
call fcn.00424e70
push eax
call fcn.00495cb8
add esp, 0xc
mov edx, dword [ebp - 0x444]
mov byte [edx + 0x4c4], al
jmp 0x481908
push str.hole
lea ecx, [ebp - 0x134]
call fcn.00424e70
push eax
call fcn.0049566d
add esp, 8
neg eax
sbb eax, eax
add eax, 1
movzx eax, al
test eax, eax
je 0x481860
push str.true
lea ecx, [ebp - 0x9c]
call fcn.00424e70
push eax
call fcn.0049566d
add esp, 8
neg eax
sbb eax, eax
add eax, 1
mov ecx, dword [ebp - 0x444]
mov byte [ecx + 0x4c5], al
jmp 0x481908
push str.xtiled
lea ecx, [ebp - 0x134]
call fcn.00424e70
push eax
call fcn.0049566d
add esp, 8
neg eax
sbb eax, eax
add eax, 1
movzx edx, al
test edx, edx
je 0x4818b5
push str.true
lea ecx, [ebp - 0x9c]
call fcn.00424e70
push eax
call fcn.0049566d
add esp, 8
neg eax
sbb eax, eax
add eax, 1
mov ecx, dword [ebp - 0x444]
mov byte [ecx + 0x4c6], al
jmp 0x481908
push str.ytiled
lea ecx, [ebp - 0x134]
call fcn.00424e70
push eax
call fcn.0049566d
add esp, 8
neg eax
sbb eax, eax
add eax, 1
movzx edx, al
test edx, edx
je 0x481908
push str.true
lea ecx, [ebp - 0x9c]
call fcn.00424e70
push eax
call fcn.0049566d
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 0x481927
jmp 0x48192c
jmp 0x48122d
mov dword [ebp - 0xa0], 0
mov dword [ebp - 0xa4], 0
call fcn.004197b0
push eax
lea ecx, [ebp - 0x1cc]
call fcn.00424bb0
mov byte [ebp - 4], 2
call fcn.004197c0
mov ecx, eax
call fcn.00424e10
movzx edx, al
test edx, edx
je 0x481ac3
mov eax, dword [ebp - 0x444]
add eax, 0x408
push eax
lea ecx, [ebp - 0x1cc]
call fcn.00424f00
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
lea ecx, [ebp - 0x1cc]
call fcn.00424e70
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x1d0], eax
cmp dword [ebp - 0x1d0], 0xffffffff
jne 0x4819ca
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1cc]
call fcn.00424bf0
jmp 0x481c89
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 0x481a09
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.00424bf0
jmp 0x481c89
mov dword [ebp - 0x1d4], 0
mov eax, dword [ebp - 0xa4]
add eax, 1
push eax
call fcn.004189fc
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 0x481abe
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0x424], eax
mov ecx, dword [ebp - 0x424]
push ecx
call fcn.00493b0b
add esp, 4
mov dword [ebp - 0xa0], 0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1cc]
call fcn.00424bf0
jmp 0x481c89
jmp 0x481c72
call fcn.004197c0
push eax
lea ecx, [ebp - 0x1cc]
call fcn.00424f00
mov dword [ebp - 0x1dc], 0
call fcn.004197d0
movzx edx, al
test edx, edx
je 0x481af7
call fcn.004197e0
mov dword [ebp - 0x1dc], eax
jmp 0x481b17
call fcn.004197f0
push eax
lea ecx, [ebp - 0x1cc]
call fcn.00424e70
push eax
call fcn.00417390
add esp, 8
mov dword [ebp - 0x1dc], eax
cmp dword [ebp - 0x1dc], 0
jne 0x481b34
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1cc]
call fcn.00424bf0
jmp 0x481c89
lea eax, [ebp - 0x414]
push eax
lea ecx, [ebp - 0x1e0]
push ecx
push 1
mov ecx, dword [ebp - 0x444]
add ecx, 0x408
call fcn.00424e70
push eax
mov edx, dword [ebp - 0x1dc]
push edx
call fcn.00417460
add esp, 0x14
test eax, eax
je 0x481b7d
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1cc]
call fcn.00424bf0
jmp 0x481c89
mov eax, dword [ebp - 0x1e8]
mov dword [ebp - 0xa4], eax
cmp dword [ebp - 0xa4], 0
jne 0x481ba6
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1cc]
call fcn.00424bf0
jmp 0x481c89
mov ecx, dword [ebp - 0xa4]
push ecx
call fcn.004189fc
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.00417560
add esp, 0x10
mov dword [ebp - 0x1d8], eax
cmp dword [ebp - 0x1d8], 0
je 0x481c57
cmp dword [ebp - 0x1d8], 0x600
je 0x481c57
mov ecx, dword [ebp - 0xa0]
mov dword [ebp - 0x42c], ecx
mov edx, dword [ebp - 0x42c]
push edx
call fcn.00493b0b
add esp, 4
mov dword [ebp - 0xa0], 0
call fcn.004197d0
movzx eax, al
test eax, eax
jne 0x481c46
mov ecx, dword [ebp - 0x1dc]
push ecx
call fcn.004175e0
add esp, 4
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1cc]
call fcn.00424bf0
jmp 0x481c89
call fcn.004197d0
movzx edx, al
test edx, edx
jne 0x481c72
mov eax, dword [ebp - 0x1dc]
push eax
call fcn.004175e0
add esp, 4
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1cc]
call fcn.00424bf0
xor ecx, ecx
jne 0x481940
cmp dword [ebp - 0xa0], 0
jne 0x481dac
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
mov ecx, dword [ebp - 0x444]
add ecx, 0x408
call fcn.00424e70
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x418], eax
cmp dword [ebp - 0x418], 0xffffffff
jne 0x481cd4
jmp 0x481dac
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 0x481d04
mov eax, dword [ebp - 0x418]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x481dac
mov dword [ebp - 0x41c], 0
mov ecx, dword [ebp - 0xa4]
add ecx, 1
push ecx
call fcn.004189fc
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 0x481da5
mov ecx, dword [ebp - 0xa0]
mov dword [ebp - 0x434], ecx
mov edx, dword [ebp - 0x434]
push edx
call fcn.00493b0b
add esp, 4
mov dword [ebp - 0xa0], 0
jmp 0x481dac
cmp dword [ebp - 0xa0], 0
jne 0x481de8
mov byte [ebp - 0x435], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x9c]
call fcn.00424bf0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x134]
call fcn.00424bf0
mov al, byte [ebp - 0x435]
jmp 0x481ed3
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.00493b0b
add esp, 4
mov eax, dword [ebp - 0x444]
cmp dword [eax + 0x4a4], 0
jne 0x481ea0
mov ecx, dword [ebp - 0x444]
cmp dword [ecx + 0x4ac], 0
jne 0x481ea0
mov edx, dword [ebp - 0x444]
cmp dword [edx + 0x4a8], 0
jne 0x481ea0
mov eax, dword [ebp - 0x444]
cmp dword [eax + 0x4b0], 0
jne 0x481ea0
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.00424bf0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x134]
call fcn.00424bf0
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.004922e7
mov esp, ebp
pop ebp
ret 4