Function at 0x473d20
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47a6ac
mov eax, dword fs:[0]
push eax
sub esp, 0x288
mov eax, dword [0x4a6a04]
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
push 0x208
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [ebp - 0x218]
mov dword [ebp - 0x230], 0
mov dword [ebp - 0x220], 0
lea edx, [ecx + 1]
mov dword [ebp - 0x21c], 0xf
mov byte [ebp - 0x230], 0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x473d90
sub ecx, edx
lea eax, [ebp - 0x218]
push ecx
push eax
lea ecx, [ebp - 0x230]
call fcn.0040cef0
lea ecx, [ebp - 0x230]
mov dword [ebp - 4], 0
call fcn.0040bdf0
lea ecx, [ebp - 0x230]
call fcn.0040b7e0
push 0x12
push str.GameVersioninf.dat
lea ecx, [ebp - 0x230]
call fcn.0040cfe0
xorps xmm0, xmm0
mov dword [ebp - method.CFile.virtual_0], vtable.CFile.0
mov byte [ebp - 0x234], 0
movlpd qword [ebp - 0x260], xmm0
lea ecx, [ebp - 0x280]
mov byte [ebp - 4], 1
call fcn.00475c80
cmp dword [ebp - 0x21c], 0x10
lea eax, [ebp - 0x230]
push 0
cmovae eax, dword [ebp - 0x230]
push 0x80
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov dword [ebp - 0x278], esi
cmp esi, 0xffffffff
jne 0x473e49
xor esi, esi
or ebx, eax
jmp 0x473fda
lea eax, [ebp - 0x288]
mov byte [ebp - 0x234], 1
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
xor ecx, ecx
xorps xmm0, xmm0
add ecx, eax
movlpd qword [ebp - 0x258], xmm0
mov eax, dword [ebp - 0x288]
adc eax, 0
mov dword [ebp - 0x260], ecx
mov dword [ebp - 0x25c], eax
movlpd qword [ebp - 0x250], xmm0
mov dword [ebp - 0x248], ecx
mov dword [ebp - 0x244], eax
cmp ecx, 9
jae 0x473ea3
or ebx, 0xffffffff
jmp 0x473fda
mov dword [ebp - 0x294], 0
mov dword [ebp - 0x290], 0
mov dword [ebp - 0x28c], 0
lea eax, [ebp - 0x281]
mov byte [ebp - 4], 2
push eax
push 0xa
lea ecx, [ebp - 0x294]
mov byte [ebp - 0x281], 0
call fcn.0040f500
mov edi, dword [ebp - 0x294]
lea ecx, [ebp - 0x280]
push 9
push edi
call fcn.00475b80
mov ecx, str.GAME_VER_
mov eax, edi
nop dword [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x473f20
test dl, dl
je 0x473f1c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x473f20
add eax, 2
add ecx, 2
test dl, dl
jne 0x473f00
xor eax, eax
jmp 0x473f25
sbb eax, eax
or eax, 1
test eax, eax
je 0x473f2e
or ebx, 0xffffffff
jmp 0x473fa1
push 1
lea eax, [ebp - 0x282]
mov byte [ebp - 0x282], 0
push eax
lea ecx, [ebp - 0x280]
call fcn.00475b80
push 1
lea eax, [ebp - 0x281]
mov byte [ebp - 0x281], 0
push eax
lea ecx, [ebp - 0x280]
call fcn.00475b80
movzx eax, byte [ebp - 0x282]
push 1
lea ecx, [eax + eax*4]
movzx eax, byte [ebp - 0x281]
mov byte [ebp - 0x281], 0
lea eax, [eax + ecx*2]
lea esi, [eax + eax*4]
lea eax, [ebp - 0x281]
add esi, esi
push eax
lea ecx, [ebp - 0x280]
call fcn.00475b80
movzx ebx, byte [ebp - 0x281]
add ebx, esi
mov byte [ebp - 4], 1
test edi, edi
je 0x473fd4
mov eax, dword [ebp - 0x28c]
mov ecx, edi
sub eax, edi
cmp eax, 0x1000
jb 0x473fcb
mov edi, dword [ecx - 4]
sub ecx, edi
lea eax, [ecx - 4]
cmp eax, 0x1f
ja 0x47407a
push edi
call fcn.0044efd0
add esp, 4
mov esi, dword [ebp - 0x278]
mov byte [ebp - 4], 0
movzx eax, byte [ebp - 0x234]
sub eax, 1
je 0x474020
sub eax, 1
je 0x474007
sub eax, 1
jne 0x47402b
mov eax, dword [ebp - 0x270]
test eax, eax
je 0x47402b
push eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x47402b
cmp byte [ebp - 0x233], 0
je 0x47402b
push dword [ebp - 0x23c]
call fcn.0044efd0
add esp, 4
jmp 0x47402b
test esi, esi
je 0x47402b
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x21c]
cmp eax, 0x10
jb 0x47405c
mov ecx, dword [ebp - 0x230]
inc eax
mov edx, ecx
cmp eax, 0x1000
jb 0x474053
mov ecx, dword [edx - 4]
sub edx, ecx
lea eax, [edx - 4]
cmp eax, 0x1f
ja 0x47407a
push ecx
call fcn.0044efd0
add esp, 4
mov eax, ebx
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.00455d51
mov esp, ebp
pop ebp
ret
call fcn.0045d555
int3