Function at 0x46f320
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa4
mov edx, dword [str..rtbw]
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x18], esi
call fcn.0046fa80
test al, al
je 0x46f94a
mov cl, byte [esi]
xorps xmm0, xmm0
xor edi, edi
mov edx, esi
movups xmmword [ebp - 0xa0], xmm0
movups xmmword [ebp - 0x90], xmm0
movups xmmword [ebp - 0x80], xmm0
movups xmmword [ebp - 0x70], xmm0
test cl, cl
je 0x46f39d
cmp cl, 0x76
jne 0x46f373
mov edi, 8
jmp 0x46f395
mov eax, 1
cmp cl, byte [eax + str._PNBRQK__pnbrqk]
je 0x46f388
inc eax
cmp eax, 6
jle 0x46f378
jmp 0x46f395
test eax, eax
je 0x46f395
or eax, edi
inc dword [ebp + eax*4 - 0xa0]
mov cl, byte [edx + 1]
inc edx
test cl, cl
jne 0x46f367
mov eax, dword [ebp - 0x78]
cdq
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x94]
mov dword [ebp - 0x5c], edx
cdq
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x14], edx
cdq
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x98]
mov dword [ebp - 0x28], edx
cdq
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x9c]
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x34], edx
cdq
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x20], edx
cdq
mov dword [ebp - 0x30], eax
mov ecx, edx
mov eax, dword [ebp - 0x8c]
cdq
mov dword [ebp - 0x1c], eax
mov ebx, edx
mov eax, dword [ebp - 0x6c]
cdq
mov edi, eax
mov dword [ebp - 0x54], ecx
mov eax, dword [ebp - 0x7c]
mov esi, edx
mov dword [ebp - 0x50], eax
cdq
push 0xd5a4c959
push 0x28f2fbe3
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x90]
push ecx
push dword [ebp - 0x30]
mov dword [ebp - 0x44], edx
cdq
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], edx
call fcn.004231e0
push 0xa3ec1abc
push 0x71e90863
push ebx
push dword [ebp - 0x1c]
mov dword [ebp - 8], eax
mov dword [ebp - 4], edx
call fcn.004231e0
add dword [ebp - 8], eax
push 0xd6e4e47d
adc dword [ebp - 4], edx
push 0x24962951
push esi
push edi
call fcn.004231e0
add dword [ebp - 8], eax
push 0xa24f0f57
adc dword [ebp - 4], edx
push 0x1bb202e7
push dword [ebp - 0x44]
push dword [ebp - 0x48]
call fcn.004231e0
add dword [ebp - 8], eax
push 0x985deb9f
adc dword [ebp - 4], edx
push 0xc49333f9
push dword [ebp - 0x3c]
push dword [ebp - 0x40]
call fcn.004231e0
add dword [ebp - 8], eax
push 0xbaeb854c
adc dword [ebp - 4], edx
push 0xd3259441
push dword [ebp - 0x5c]
push dword [ebp - 0xc]
call fcn.004231e0
add dword [ebp - 8], eax
push 0xaadc1a2b
adc dword [ebp - 4], edx
push 0xe446234d
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call fcn.004231e0
add dword [ebp - 8], eax
push 0xfd7866b4
adc dword [ebp - 4], edx
push 0x39b94495
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
call fcn.004231e0
add dword [ebp - 8], eax
push 0xd2fb8186
adc dword [ebp - 4], edx
push 0x2830191f
push dword [ebp - 0x34]
push dword [ebp - 0x38]
call fcn.004231e0
add dword [ebp - 8], eax
push 0xec0ade19
adc dword [ebp - 4], edx
push 0xc0f6003
push dword [ebp - 0x20]
push dword [ebp - 0x24]
call fcn.004231e0
add dword [ebp - 8], eax
push 0xd5a4c959
adc dword [ebp - 4], edx
push 0x28f2fbe3
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call fcn.004231e0
push 0xa3ec1abc
push 0x71e90863
push esi
push edi
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], edx
call fcn.004231e0
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 0x14]
add esi, eax
push 0xd6e4e47d
push 0x24962951
push ebx
push dword [ebp - 0x1c]
adc edi, edx
call fcn.004231e0
push 0xa24f0f57
push 0x1bb202e7
push dword [ebp - 0x20]
add esi, eax
push dword [ebp - 0x24]
adc edi, edx
call fcn.004231e0
push 0x985deb9f
push 0xc49333f9
push dword [ebp - 0x28]
add esi, eax
push dword [ebp - 0x2c]
adc edi, edx
call fcn.004231e0
push 0xaadc1a2b
push 0xe446234d
push dword [ebp - 0x54]
add esi, eax
push dword [ebp - 0x30]
adc edi, edx
call fcn.004231e0
push 0xbaeb854c
push 0xd3259441
push dword [ebp - 0x34]
add esi, eax
push dword [ebp - 0x38]
adc edi, edx
call fcn.004231e0
push 0xfd7866b4
push 0x39b94495
push dword [ebp - 0x3c]
add esi, eax
push dword [ebp - 0x40]
adc edi, edx
call fcn.004231e0
push 0xec0ade19
push 0xc0f6003
push dword [ebp - 0x44]
add esi, eax
push dword [ebp - 0x48]
adc edi, edx
call fcn.004231e0
push 0xd2fb8186
push 0x2830191f
push dword [ebp - 0x5c]
add esi, eax
push dword [ebp - 0xc]
adc edi, edx
call fcn.004231e0
add esi, eax
mov dword [ebp - 0x10], esi
adc edi, edx
cmp dword [ebp - 0x4c], 0
mov dword [ebp - 0x14], edi
jne 0x46f644
cmp dword [ebp - 0x50], 0
jne 0x46f644
mov eax, dword [0x5b9cf0]
xor cl, cl
lea esi, [eax + eax*4]
shl esi, 6
add esi, dword [0x5b9cfc]
inc eax
mov dword [0x5b9cf0], eax
jmp 0x46f65d
mov eax, dword [0x5b9cf8]
mov cl, 1
imul esi, eax, 0x510
add esi, dword [0x5ba88c]
inc eax
mov dword [0x5b9cf8], eax
mov eax, dword [ebp - 4]
mov byte [esi + 0x25], cl
mov ecx, dword [ebp - 8]
mov dword [esi], ecx
mov dword [esi + 4], eax
cmp ecx, dword [ebp - 0x10]
jne 0x46f678
cmp eax, edi
jne 0x46f678
mov al, 1
jmp 0x46f67a
xor al, al
mov byte [esi + 0x24], al
xor cl, cl
xor eax, eax
xor dl, dl
nop dword [eax]
nop word [eax + eax]
add cl, byte [ebp + eax*4 - 0xa0]
add dl, byte [ebp + eax*4 - 0x9c]
add eax, 2
cmp eax, 0x10
jl 0x46f690
mov eax, dword [str..rtbm]
add cl, dl
mov edi, dword [ebp - 0x18]
mov edx, eax
inc dword [0x5ba880]
mov byte [esi + 0x23], cl
mov ecx, edi
mov dword [ebp - 0x54], eax
call fcn.00472780
mov ebx, eax
mov dword [ebp - 0xc], ebx
cmp ebx, 0xffffffff
je 0x46f72c
lea eax, [ebp - 0x60]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
jne 0x46f6e8
push ebx
call eax
jmp 0x46f6f8
push dword [ebp - 0xc]
mov ebx, dword [ebp - 0x60]
call eax
and bl, 0x3f
cmp bl, 0x10
je 0x46f726
mov ebx, dword [ebp - 0x54]
push ebx
push edi
push str.Incomplete_tablebase_file__s._s_n
push 2
call fcn.0042db9f
add esp, 4
push eax
call fcn.00420900
push ebx
push edi
push str.info_string_Incomplete_tablebase_file__s._s_n
call fcn.00420920
add esp, 0x1c
or ebx, 0xffffffff
jmp 0x46f729
mov ebx, dword [ebp - 0xc]
cmp ebx, 0xffffffff
setne al
mov ecx, edi
mov byte [esi + 0x26], al
movzx eax, al
add dword [0x5ba884], eax
mov eax, dword [str..rtbz]
mov edx, eax
mov dword [ebp - 0x18], eax
call fcn.00472780
mov ebx, eax
mov dword [ebp - 0xc], ebx
cmp ebx, 0xffffffff
je 0x46f7b6
lea eax, [ebp - 0x58]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x46f76e
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x46f782
push dword [ebp - 0xc]
mov ebx, dword [ebp - 0x58]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and bl, 0x3f
cmp bl, 0x10
je 0x46f7b0
mov ebx, dword [ebp - 0x18]
push ebx
push edi
push str.Incomplete_tablebase_file__s._s_n
push 2
call fcn.0042db9f
add esp, 4
push eax
call fcn.00420900
push ebx
push edi
push str.info_string_Incomplete_tablebase_file__s._s_n
call fcn.00420920
add esp, 0x1c
or ebx, 0xffffffff
jmp 0x46f7b3
mov ebx, dword [ebp - 0xc]
cmp ebx, 0xffffffff
movzx ecx, byte [esi + 0x23]
setne al
mov byte [esi + 0x27], al
movzx eax, al
add dword [0x5b9cf4], eax
mov eax, dword [0x5ba998]
cmp ecx, eax
cmovg eax, ecx
cmp byte [esi + 0x26], 0
mov dword [0x5ba998], eax
je 0x46f7ed
mov eax, dword [0x5ba994]
cmp ecx, eax
cmovg eax, ecx
mov dword [0x5ba994], eax
xor eax, eax
nop
mov byte [esi + eax + 0x20], 0
inc eax
cmp eax, 3
jl 0x46f7f0
cmp byte [esi + 0x25], 0
jne 0x46f894
movaps xmm3, xmmword [0x494eb0]
xor eax, eax
xorps xmm4, xmm4
xorps xmm2, xmm2
nop dword [eax]
nop dword [eax + eax]
movups xmm1, xmmword [ebp + eax*4 - 0xa0]
movaps xmm0, xmm4
paddd xmm0, xmm3
pcmpeqd xmm1, xmm3
pand xmm0, xmm1
pandn xmm1, xmm4
por xmm0, xmm1
movups xmm1, xmmword [ebp + eax*4 - 0x90]
add eax, 8
movaps xmm4, xmm0
movaps xmm0, xmm2
pcmpeqd xmm1, xmm3
paddd xmm0, xmm3
pand xmm0, xmm1
pandn xmm1, xmm2
por xmm0, xmm1
movaps xmm2, xmm0
cmp eax, 0x10
jl 0x46f820
paddd xmm2, xmm4
movaps xmm0, xmm2
psrldq xmm0, 8
paddd xmm2, xmm0
movups xmm0, xmm2
psrldq xmm0, 4
paddd xmm2, xmm0
movd eax, xmm2
cmp eax, 2
sete al
jmp 0x46f8af
mov eax, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x4c]
mov byte [esi + 0x28], cl
mov byte [esi + 0x29], al
test eax, eax
je 0x46f8b2
test ecx, ecx
je 0x46f8ac
cmp ecx, eax
jle 0x46f8b2
mov byte [esi + 0x29], cl
mov byte [esi + 0x28], al
mov edx, dword [ebp - 4]
mov ecx, edx
shr ecx, 0x14
mov eax, ecx
shl eax, 4
cmp dword [eax + 0x5a9cf8], 0
je 0x46f8e5
nop dword [eax + eax]
inc ecx
and ecx, 0xfff
mov eax, ecx
shl eax, 4
cmp dword [eax + 0x5a9cf8], 0
jne 0x46f8d0
mov eax, dword [ebp - 8]
mov ebx, dword [ebp - 0x10]
mov edi, dword [ebp - 0x14]
shl ecx, 4
mov dword [ecx + 0x5a9cf0], eax
mov dword [ecx + 0x5a9cf4], edx
mov dword [ecx + 0x5a9cf8], esi
cmp eax, ebx
jne 0x46f90b
cmp edx, edi
je 0x46f94a
mov ecx, edi
shr ecx, 0x14
mov eax, ecx
shl eax, 4
cmp dword [eax + 0x5a9cf8], 0
je 0x46f935
nop
inc ecx
and ecx, 0xfff
mov eax, ecx
shl eax, 4
cmp dword [eax + 0x5a9cf8], 0
jne 0x46f920
shl ecx, 4
mov dword [ecx + 0x5a9cf0], ebx
mov dword [ecx + 0x5a9cf4], edi
mov dword [ecx + 0x5a9cf8], esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret